summaryrefslogtreecommitdiff
path: root/src/HTML5
diff options
context:
space:
mode:
authorMatt Farina <[email protected]>2013-11-04 16:57:29 -0500
committerMatt Farina <[email protected]>2013-11-04 16:57:29 -0500
commit10e129bd8be814b3b8a327416c2c4e1d67b0f678 (patch)
tree7ceb1576d808bd8802fc004d9f81aa4f29ee58ed /src/HTML5
parent246ed7785e93cc1ebf59a2f15af61472d20efca0 (diff)
#20 Some of the parser rules, for special cases, were not returning the element to use as the current element. This caused the current parser element to get messed up.
Diffstat (limited to 'src/HTML5')
-rw-r--r--src/HTML5/Parser/TreeBuildingRules.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/HTML5/Parser/TreeBuildingRules.php b/src/HTML5/Parser/TreeBuildingRules.php
index 0f1b3a5..b87c6b5 100644
--- a/src/HTML5/Parser/TreeBuildingRules.php
+++ b/src/HTML5/Parser/TreeBuildingRules.php
@@ -71,20 +71,19 @@ class TreeBuildingRules {
case 'rp':
return $this->handleRT($new, $current);
case 'optgroup':
- $this->closeIfCurrentMatches($new, $current, array('optgroup'));
+ return $this->closeIfCurrentMatches($new, $current, array('optgroup'));
case 'option':
- $this->closeIfCurrentMatches($new, $current, array('option', 'optgroup'));
+ return $this->closeIfCurrentMatches($new, $current, array('option', 'optgroup'));
case 'tr':
- $this->closeIfCurrentMatches($new, $current, array('tr'));
+ return $this->closeIfCurrentMatches($new, $current, array('tr'));
case 'td':
case 'th':
- $this->closeIfCurrentMatches($new, $current, array('th', 'td'));
+ return $this->closeIfCurrentMatches($new, $current, array('th', 'td'));
case 'tbody':
case 'thead':
case 'tfoot':
case 'table': // Spec isn't explicit about this, but it's necessary.
- $this->closeIfCurrentMatches($new, $current, array('thead', 'tfoot', 'tbody'));
-
+ return $this->closeIfCurrentMatches($new, $current, array('thead', 'tfoot', 'tbody'));
}
return $current;