-
Notifications
You must be signed in to change notification settings - Fork 580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mojo::DOM doesn't recognize end of comment (when it should) #2030
Comments
The entire block/line is treated like a comment: perl -Mojo -E 'my $x = x "<!-- --!> <p>OK</p> <!-- -->"; say r $x' bless( do{\(my $o = bless( {
"tree" => [
"root",
[
"comment",
" --!> <p>OK</p> <!-- ",
${$VAR1}->{"tree"}
]
]
}, 'Mojo::DOM::HTML' ))}, 'Mojo::DOM' ) |
In In
|
Very interesting. Although we are using |
Please take a look at the PR and let me know if that would work for you. I included the test cases from the description. |
Steps to reproduce the behavior
Expected behavior
Test passes.
After
<!--
we are in the comment start state. If the very next characters are>
or->
, an abrupt-closing-of-empty-comment error occurs. If the parser doesn't abort entirely, it must treat the comment as closed and switch back to the data state.Otherwise, if we see
--!
inside a comment, we switch to the comment end bang state. If the very next character is a>
, an incorrectly-closed-comment error occurs. If the parser doesn't abort entirely, it must treat the comment as closed and switch back to the data state.Actual behavior
The text was updated successfully, but these errors were encountered: