Skip to content

Commit

Permalink
Fixed issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
genius257 committed Sep 13, 2021
1 parent 0a95e9c commit b09b3ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Dom/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ private function parseTag(Options $options, Content $content, int $size): TagDTO
if (\trim($tag) == '') {
// no tag found, invalid < found
return TagDTO::makeFromPrimitives();
} elseif ($tag === '!doctype') {
$tag = (new Tag($rawTag))
->noTrailingSlash()
->selfClosing();
}
}
$node = new HtmlNode($tag, $rawTag);
Expand Down

0 comments on commit b09b3ad

Please sign in to comment.