Skip to content

fix: report comments before a comma-continued concise attr line - #250

Merged
DylanPiercey merged 1 commit into
mainfrom
dpiercey-ws-prettier-marko-async-ulp3vg
Sep 23, 2026
Merged

DylanPiercey merged 1 commit into
mainfrom
dpiercey-ws-prettier-marko-async-ulp3vg

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

In a concise open tag, the parser looks ahead from a newline past whitespace and comments for a , that continues the tag on the next line. When it found one, it jumped past everything it had skipped, so comments on those lines reached no handler and consumers dropped them (e.g. prettier-plugin-marko deleted them on format). It now steps past only the newline and lets the open tag parse the rest, which reports each comment through onOpenTagComment, like any other comment that stands alone in an open tag.

Also files an agent-feedback item for the bench's COMPARE mode, which installs the compared ref with npm ci and fails in this pnpm repo.

🤖 Generated with Claude Code

At a newline in a concise open tag, the parser looks ahead past whitespace and
comments for a `,` that continues the tag on the next line, and jumped past
everything it skipped, so the comments on those lines reached no handler and
consumers dropped them. It now steps past only the newline and parses the rest
as part of the open tag, which reports each comment through `onOpenTagComment`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ddd3901

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
htmljs-parser Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Sep 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.95%. Comparing base (c84a938) to head (ddd3901).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #250   +/-   ##
=======================================
  Coverage   99.95%   99.95%           
=======================================
  Files          35       35           
  Lines        4611     4611           
  Branches      888      888           
=======================================
  Hits         4609     4609           
  Misses          2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai

coderabbitai Bot commented Sep 23, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: cc512e18-3d41-4450-919a-8d2cc5f7cb90

📥 Commits

Reviewing files that changed from the base of the PR and between c84a938 and ddd3901.

⛔ Files ignored due to path filters (2)
  • src/__tests__/fixtures/attr-comma-multiline-comments/__snapshots__/attr-comma-multiline-comments.expected.txt is excluded by !**/__snapshots__/** and included by **
  • src/__tests__/fixtures/open-tag-comments-concise/__snapshots__/open-tag-comments-concise.expected.txt is excluded by !**/__snapshots__/** and included by **
📒 Files selected for processing (4)
  • .changeset/concise-attr-line-comments.md
  • agent-feedback/items/2026-09-23-bench-compare-installs-with-npm.md
  • src/__tests__/fixtures/open-tag-comments-concise/input.marko
  • src/states/OPEN_TAG.ts

Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


Walkthrough

The concise open-tag scanner now keeps comments before a comma-continued attribute line within the open tag. A fixture adds comments before a type attribute, and a changeset describes reporting those comments through onOpenTagComment. A separate benchmark note documents pnpm setup commands for cloned references and records an observed npm install failure.

Merge Risk: ⚪ Minimal · up to ddd39

The intended comment-reporting behavior is covered by the parser wiring and fixture snapshots; the PR is mergeable.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main parser change: reporting comments before comma-continued concise attribute lines.
Description check ✅ Passed The description accurately explains the parser behavior change, the impact on consumers, and the separate benchmark feedback item.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@DylanPiercey
DylanPiercey merged commit 83e9907 into main Sep 23, 2026
11 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 23, 2026
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

Successfully merging this pull request may close these issues.

1 participant