Skip to content

Commit

Permalink
Fixed issue where html comments parsed wrong
Browse files Browse the repository at this point in the history
HTML comments token matching end requirement for comments checked for if any individual char of the end comment tag appeared, not for the entire string.
  • Loading branch information
genius257 authored Oct 1, 2021
1 parent b09b3ad commit 38f9268
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Dom/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ private function parseTag(Options $options, Content $content, int $size): TagDTO
} elseif($content->string(3) == '!--') {
// comment tag
$tag = $content->fastForward(3)
->copyByToken(StringToken::CLOSECOMMENT(), true);
->copyByToken(StringToken::CLOSECOMMENT(), false);
$tag = (new Tag($tag))
->setOpening('<!--')
->setClosing('-->')
Expand Down Expand Up @@ -265,4 +265,4 @@ private function makeEndTag(Content $content, Options $options): TagDTO

return TagDTO::makeFromPrimitives(true, true, null, \strtolower($tag));
}
}
}

0 comments on commit 38f9268

Please sign in to comment.