Repository navigation
fix: move a tag var's trailing line comment into a block comment - #153
DylanPiercey merged 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 0430259 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #153 +/- ##
==========================================
+ Coverage 98.17% 98.21% +0.04%
==========================================
Files 8 8
Lines 329 337 +8
Branches 58 62 +4
==========================================
+ Hits 323 331 +8
Misses 1 1
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (3)
Included review availability: 2 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour. WalkthroughThe change adds Merge Risk: ⚪ Minimal · up to The formatting change is ready to merge after normal checks; no identified issue remains that would block it. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
htmljs-parser folds a trailing line comment into a tag var, and the embed
formatted it as `var ${code}=_`, putting the `=_` in the comment, so it fell
back to the source text, where the comment swallowed the rest of the open
tag. A tag var cannot be parenthesized like an attr value, so the comment is
split off, using htmljs-parser to find where it starts, and printed as a
block comment after the var, with and without a JS parser. A comment before
a default attr is glued to its `=` the same way, since after a tag var it
joins the var's comments on the next parse.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
690eebc to
0430259
Compare
htmljs-parser folds a trailing
//comment into a tag var, which the compiler now accepts (marko-js/marko#4242). TheTagVarembed formatted it asvar ${code}=_, putting the=_inside the comment, so it fell back to printing the source, where the comment swallowed the rest of the open tag (<a/x // c/>). A tag var cannot be parenthesized like an attr value, so the comment is split off, using htmljs-parser's validators to find where it starts, and printed as a block comment after the var (<let/count /* total */=0>), which stays valid in both syntaxes, with and without a JS parser.🤖 Generated with Claude Code