8000 Fix tests 36 and 37 of tests2.dat in the TreeConstructor. · Nimbleworks/html5lib-php@294ab98 · GitHub
[go: up one dir, main page]

Skip to content

Commit 294ab98

Browse files
committed
Fix tests 36 and 37 of tests2.dat in the TreeConstructor.
1 parent a1afbbe commit 294ab98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/HTML5/TreeConstructer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2420,7 +2420,7 @@ public function emitToken($token, $mode = null) {
24202420
/* If the current node is an optgroup element, then pop that node
24212421
from the stack of open elements. Otherwise, this is a parse error,
24222422
ignore the token. */
2423-
if(end($this->stack) === 'optgroup') {
2423+
if(end($this->stack)->tagName === 'optgroup') {
24242424
array_pop($this->stack);
24252425
} else {
24262426
// parse error

0 commit comments

Comments
 (0)
0