Skip to content

feat(scanner): support comments between concise mode line attributes#6

Merged
DylanPiercey merged 1 commit into
mainfrom
claude/tree-sitter-htmljs-parser-sync-nj1ils
Jun 26, 2026
Merged

feat(scanner): support comments between concise mode line attributes#6
DylanPiercey merged 1 commit into
mainfrom
claude/tree-sitter-htmljs-parser-sync-nj1ils

Conversation

@DylanPiercey

@DylanPiercey DylanPiercey commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Ports htmljs-parser's open-tag eol scan to the external scanner. In concise mode, // line and /* */ block comments may now appear between comma-prefixed line attributes — they are scanned over (not emitted) and no longer terminate the open tag. A trailing comment with no following comma still ends the tag and is emitted as a normal comment.

This PR also adds a changeset for the change (see #7 for the changesets setup).

Mirrors marko-js/htmljs-parser@4d28e16 (marko-js/htmljs-parser#203).

Verified against htmljs-parser at that commit: the full fixture-comparison suite passes (374), including the new attr-comma-multiline-comments and attr-comma-multiline-comment-trailing fixtures, plus block/line/unterminated/CRLF edge cases.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DylanPiercey, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 7 minutes and 41 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d1b7102d-fd75-498f-ac24-942ca61307a6

📥 Commits

Reviewing files that changed from the base of the PR and between 315e866 and 84c0a19.

📒 Files selected for processing (2)
  • .changeset/comments-between-concise-line-attributes.md
  • src/scanner.c
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/tree-sitter-htmljs-parser-sync-nj1ils

Comment @coderabbitai help to get the list of available commands.

Port htmljs-parser's open-tag eol scan to the external scanner. In
concise mode, `//` line and `/* */` block comments may now appear
between comma-prefixed line attributes: the comment lines are scanned
over (not emitted) and no longer terminate the open tag. A trailing
comment with no following comma still ends the tag and is emitted as a
normal comment (unchanged behavior).

Both the concise_tag_epilogue lookahead (which sets tag_comma_continue)
and the newline consumption inside the open-tag scan now skip whitespace
and comment lines before the continuing comma, via a shared
scan_line_attr_trivia helper. An unterminated block comment or a lone
`/` ends the scan, matching the reference parser.

Mirrors marko-js/htmljs-parser@4d28e16
(marko-js/htmljs-parser#203). Verified against htmljs-parser at that
commit: the full fixture-comparison suite passes (374), including the
new attr-comma-multiline-comments and attr-comma-multiline-comment-
trailing fixtures, plus block/line/unterminated/CRLF edge cases.
@DylanPiercey
DylanPiercey force-pushed the claude/tree-sitter-htmljs-parser-sync-nj1ils branch from 8229de6 to 84c0a19 Compare June 26, 2026 16:26
@DylanPiercey
DylanPiercey merged commit d60112d into main Jun 26, 2026
8 checks passed
@DylanPiercey
DylanPiercey deleted the claude/tree-sitter-htmljs-parser-sync-nj1ils branch June 26, 2026 16:45
@github-actions github-actions Bot mentioned this pull request Jun 26, 2026
@DylanPiercey DylanPiercey moved this to Done in Roadmap Jun 29, 2026
@DylanPiercey DylanPiercey self-assigned this Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant