(type)
| 189 | } |
| 190 | |
| 191 | function element(type) { |
| 192 | if (type == "openTag") { |
| 193 | curState.tagName = tagName; |
| 194 | return cont(attributes, endtag(curState.startOfLine)); |
| 195 | } else if (type == "closeTag") { |
| 196 | var err = false; |
| 197 | if (curState.context) { |
| 198 | if (curState.context.tagName != tagName) { |
| 199 | if (Kludges.implicitlyClosed.hasOwnProperty(curState.context.tagName.toLowerCase())) { |
| 200 | popContext(); |
| 201 | } |
| 202 | err = !curState.context || curState.context.tagName != tagName; |
| 203 | } |
| 204 | } else { |
| 205 | err = true; |
| 206 | } |
| 207 | if (err) setStyle = "error"; |
| 208 | return cont(endclosetag(err)); |
| 209 | } |
| 210 | return cont(); |
| 211 | } |
| 212 | function endtag(startOfLine) { |
| 213 | return function(type) { |
| 214 | var tagName = curState.tagName; |
nothing calls this directly
no test coverage detected