Skip to content

fix: end a comment-only attribute value at the comment - #270

Merged
DylanPiercey merged 1 commit into
mainfrom
dpiercey-w2-htmljs-rust-4t8x5b
Nov 14, 2026
Merged

DylanPiercey merged 1 commit into
mainfrom
dpiercey-w2-htmljs-rust-4t8x5b

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

A value continues past leading comments (x=/* note */ 1, from 5.21) only when a value actually follows them. When the tag ends instead, as in <div a=/* c */ > or div a=/* c */ ;, the value took in the whitespace before the terminator ("/* c */ "), unlike any other value; it now ends at the comment. Found while porting the 5.21 changes to tree-sitter.

🤖 Generated with Claude Code

A value continues past leading comments only when a value follows them;
when the tag ends instead (`<div a=/* c */ >`), the value took in the
whitespace before the `>`, unlike any other value. It now ends at the
comment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 133c5fc

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 Nov 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.90%. Comparing base (a60803e) to head (133c5fc).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #270   +/-   ##
=======================================
  Coverage   99.89%   99.90%           
=======================================
  Files          35       35           
  Lines        4990     5015   +25     
  Branches      986      990    +4     
=======================================
+ Hits         4985     5010   +25     
  Misses          5        5           

☔ 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.

@DylanPiercey
DylanPiercey merged commit b15246b into main Nov 14, 2026
11 of 12 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 14, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Roadmap Nov 30, 2026
@DylanPiercey DylanPiercey self-assigned this Nov 30, 2026
@DylanPiercey DylanPiercey moved this from Todo to Done in Roadmap Nov 30, 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