Skip to content
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

HTMLLexer: wrong rule for html comments #4349

Open
HubertKauker opened this issue Dec 6, 2024 · 0 comments
Open

HTMLLexer: wrong rule for html comments #4349

HubertKauker opened this issue Dec 6, 2024 · 0 comments

Comments

@HubertKauker
Copy link

HubertKauker commented Dec 6, 2024

Hi all.

The HTMLLexer.g4 contains the rule: HTML_COMMENT: '<!--' .*? '-->';

But that seems to be wrong, because on whatwg.org we find:

13.1.6 Comments
Comments must have the following format:
• The string "<!--".
• Optionally, text, with the additional restriction that the text 
must not start with the string ">", nor start with the string "->", 
nor contain the strings "<!--", "-->", or "--!>", 
nor end with the string "<!-".
• The string "-->”.

So, the comment text is not just .*? , right? Thanks.

@HubertKauker HubertKauker changed the title HTMLLexer not HTMLLexer: wrong rule for html comments Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant