Skip to content

fix(parser): support HTML close comment on first line - #5518

Open
aoright wants to merge 1 commit into
boa-dev:mainfrom
aoright:fix-html-close-comment
Open

fix(parser): support HTML close comment on first line#5518
aoright wants to merge 1 commit into
boa-dev:mainfrom
aoright:fix-html-close-comment

Conversation

@aoright

@aoright aoright commented Sep 11, 2026

Copy link
Copy Markdown

Fixes #5375. Annex B allows an HTML close comment (-->) at the start of the source code. The lexer did not treat the start of the file identically to a LineTerminator sequence, resulting in a SyntaxError. This PR updates the buffered lexer to check if the previous token is missing (which occurs at the start of parsing) and handles skipping --> correctly in that case.

@aoright
aoright requested a review from a team as a code owner September 11, 2026 08:18
@github-actions github-actions Bot added the Waiting On Review Waiting on reviews from the maintainers label Sep 11, 2026
@github-actions github-actions Bot added this to the v0.23 milestone Sep 11, 2026
@github-actions github-actions Bot added the C-Parser Issues surrounding the parser label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Parser Issues surrounding the parser Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Annex B: --> SingleLineHTMLCloseComment on first line throws SyntaxError

1 participant