function Tokenizer::markupDeclaration
Look for markup.
1 call to Tokenizer::markupDeclaration()
- Tokenizer::consumeData in vendor/
masterminds/ html5/ src/ HTML5/ Parser/ Tokenizer.php - Consume a character and make a move. HTML5 8.2.4.1.
File
-
vendor/
masterminds/ html5/ src/ HTML5/ Parser/ Tokenizer.php, line 317
Class
- Tokenizer
- The HTML5 tokenizer.
Namespace
Masterminds\HTML5\ParserCode
protected function markupDeclaration() {
$tok = $this->scanner
->next();
// Comment:
if ('-' == $tok && '-' == $this->scanner
->peek()) {
$this->scanner
->consume(2);
return $this->comment();
}
elseif ('D' == $tok || 'd' == $tok) {
// Doctype
return $this->doctype();
}
elseif ('[' == $tok) {
// CDATA section
return $this->cdataSection();
}
// FINISH
$this->parseError('Expected <!--, <![CDATA[, or <!DOCTYPE. Got <!%s', $tok);
$this->bogusComment('<!');
return true;
}