summaryrefslogtreecommitdiff
path: root/src/HTML5/Parser/Tokenizer.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/HTML5/Parser/Tokenizer.php')
-rw-r--r--src/HTML5/Parser/Tokenizer.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/HTML5/Parser/Tokenizer.php b/src/HTML5/Parser/Tokenizer.php
index 4f2f792..02bb328 100644
--- a/src/HTML5/Parser/Tokenizer.php
+++ b/src/HTML5/Parser/Tokenizer.php
@@ -303,11 +303,15 @@ class Tokenizer {
}
while (!$this->isTagEnd($selfClose));
- $this->events->startTag($name, $attributes, $selfClose);
+ $mode = $this->events->startTag($name, $attributes, $selfClose);
// Should we do this? What does this buy that selfClose doesn't?
if ($selfClose) {
$this->events->endTag($name);
}
+ elseif (is_int($mode)) {
+ //fprintf(STDOUT, "Event response says move into mode %d for tag %s", $mode, $name);
+ $this->setTextMode($mode, $name);
+ }
$this->scanner->next();
@@ -816,6 +820,7 @@ class Tokenizer {
}
// If we get here, we hit the EOF.
+ $this->parseError("Unexpected EOF during text read.");
return $buffer;
}