|
@@ 2198-2222 (lines=25) @@
|
| 2195 |
|
"ol", "pre", "ul" */ |
| 2196 |
|
case 'address': case 'blockquote': case 'center': case 'dir': |
| 2197 |
|
case 'div': case 'dl': case 'fieldset': case 'listing': |
| 2198 |
|
case 'menu': case 'ol': case 'pre': case 'ul': |
| 2199 |
|
/* If the stack of open elements has an element in scope |
| 2200 |
|
with the same tag name as that of the token, then generate |
| 2201 |
|
implied end tags. */ |
| 2202 |
|
if($this->elementInScope($token['name'])) { |
| 2203 |
|
$this->generateImpliedEndTags(); |
| 2204 |
|
|
| 2205 |
|
/* Now, if the current node is not an element with |
| 2206 |
|
the same tag name as that of the token, then this |
| 2207 |
|
is a parse error. */ |
| 2208 |
|
// w/e |
| 2209 |
|
|
| 2210 |
|
/* If the stack of open elements has an element in |
| 2211 |
|
scope with the same tag name as that of the token, |
| 2212 |
|
then pop elements from this stack until an element |
| 2213 |
|
with that tag name has been popped from the stack. */ |
| 2214 |
|
for($n = count($this->stack) - 1; $n >= 0; $n--) { |
| 2215 |
|
if($this->stack[$n]->nodeName === $token['name']) { |
| 2216 |
|
$n = -1; |
| 2217 |
|
} |
| 2218 |
|
|
| 2219 |
|
array_pop($this->stack); |
| 2220 |
|
} |
| 2221 |
|
} |
| 2222 |
|
break; |
| 2223 |
|
|
| 2224 |
|
/* An end tag whose tag name is "form" */ |
| 2225 |
|
case 'form': |
|
@@ 2277-2301 (lines=25) @@
|
| 2274 |
|
break; |
| 2275 |
|
|
| 2276 |
|
/* An end tag whose tag name is "dd", "dt", or "li" */ |
| 2277 |
|
case 'dd': case 'dt': case 'li': |
| 2278 |
|
/* If the stack of open elements has an element in scope |
| 2279 |
|
whose tag name matches the tag name of the token, then |
| 2280 |
|
generate implied end tags, except for elements with the |
| 2281 |
|
same tag name as the token. */ |
| 2282 |
|
if($this->elementInScope($token['name'])) { |
| 2283 |
|
$this->generateImpliedEndTags(array($token['name'])); |
| 2284 |
|
|
| 2285 |
|
/* If the current node is not an element with the same |
| 2286 |
|
tag name as the token, then this is a parse error. */ |
| 2287 |
|
// w/e |
| 2288 |
|
|
| 2289 |
|
/* If the stack of open elements has an element in scope |
| 2290 |
|
whose tag name matches the tag name of the token, then |
| 2291 |
|
pop elements from this stack until an element with that |
| 2292 |
|
tag name has been popped from the stack. */ |
| 2293 |
|
for($n = count($this->stack) - 1; $n >= 0; $n--) { |
| 2294 |
|
if($this->stack[$n]->nodeName === $token['name']) { |
| 2295 |
|
$n = -1; |
| 2296 |
|
} |
| 2297 |
|
|
| 2298 |
|
array_pop($this->stack); |
| 2299 |
|
} |
| 2300 |
|
} |
| 2301 |
|
break; |
| 2302 |
|
|
| 2303 |
|
/* An end tag whose tag name is one of: "h1", "h2", "h3", "h4", |
| 2304 |
|
"h5", "h6" */ |