8000 Sketchy bugfix that fixes one test-case but breaks another. · Nimbleworks/html5lib-php@d50aff7 · GitHub
[go: up one dir, main page]

Skip to content

Commit d50aff7

Browse files
author
Edward Z. Yang ext:(%22)
committed
Sketchy bugfix that fixes one test-case but breaks another.
1 parent c078c20 commit d50aff7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

library/HTML5/TreeConstructer.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,9 +1732,11 @@ public function emitToken($token, $mode = null) {
17321732

17331733
/* Pop all the nodes from the current node up to
17341734
node, including node, then stop these steps. */
1735-
for($x = count($this->stack) - $n; $x >= $n; $x--) {
1736-
array_pop($this->stack);
1737-
}
1735+
// XSKETCHY
1736+
do {
1737+
$pop = array_pop($this->stack);
1738+
} while ($pop !== $node);
1739+
break;
17381740

17391741
} else {
17401742
$category = $this->getElementCategory($node);

0 commit comments

Comments
 (0)
0