fix(core/lint): findRootTag ignores <video>-like tokens inside HTML comments / <style> / <script>#1446
Closed
ukimsanov wants to merge 1 commit into
Closed
fix(core/lint): findRootTag ignores <video>-like tokens inside HTML comments / <style> / <script>#1446ukimsanov wants to merge 1 commit into
ukimsanov wants to merge 1 commit into
Conversation
This was referenced Jun 14, 2026
…omments / <style> / <script>
A literal `<video>` written inside a CSS comment block (e.g.
`/* card uses <video> as surface */`) was being picked as the
composition root, producing two cascading false errors:
`root_missing_composition_id` + `root_missing_dimensions`.
`findRootTag` now masks comment + style + script ranges (with same-length
whitespace so tag offsets stay aligned) before running the tag scan.
Existing `stripJsComments` / `extractScriptTextsAndSrcs` exports preserved
(downstream rule consumers in rules/{adapters,composition,core,gsap}.ts
still read `rootTag.raw` + `rootTag.index` against the real source
offsets — safe under the new masking).
86e7fe1 to
c4e13ef
Compare
Collaborator
Author
|
Closing — verified no composition in current main has the trigger pattern ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A literal
<video>token written inside a CSS comment block (e.g./* card uses <video> as surface */) was being picked as the composition root, producing two cascading false errors:root_missing_composition_id+root_missing_dimensions.findRootTagnow masks<!-- -->/<style>…</style>/<script>…</script>ranges with same-length whitespace (so tag offsets stay aligned for downstream consumers) before running the tag scan.Verification
stripJsComments/extractScriptTextsAndSrcsexports preserved (downstream rule consumers inrules/{adapters,composition,core,gsap}.tsreadrootTag.raw+rootTag.indexagainst the real source offsets — safe under the new masking)bun run --filter @hyperframes/core testpassesSibling PRs in this stack
All three independent; merge order doesn't matter.
Test plan
bun run --filter @hyperframes/core typecheckpassesbun run --filter @hyperframes/core testpasses