Add TSRX syntax highlighting - #1
Conversation
📝 WalkthroughWalkthroughAdds the ChangesTSRX language implementation
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant createHighlighter
participant tsrx
participant collectScriptRanges
participant Tests
Tests->>createHighlighter: Register tsrx
createHighlighter->>tsrx: Tokenize source
tsrx->>collectScriptRanges: Collect script and JSX ranges
collectScriptRanges-->>tsrx: Return token ranges
tsrx-->>createHighlighter: Add TSRX keyword ranges
createHighlighter-->>Tests: Return highlighted tokens
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/regressions.test.ts (1)
155-170: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover line-start JSX-looking lexical content.
Add multiline template-string and block-comment cases where
<Tag />starts a physical line; this directly exercisesjsxAtLineStartand ensures lexical ranges still win over JSX tags.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/regressions.test.ts` around lines 155 - 170, Add multiline template-string and block-comment cases to the regression test covering `<Tag />` at physical line start, asserting it remains lexical content rather than being tokenized as JSX. Ensure the cases exercise `jsxAtLineStart`, preserve lexical-range precedence, and continue verifying reconstructed output.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@test/regressions.test.ts`:
- Around line 155-170: Add multiline template-string and block-comment cases to
the regression test covering `<Tag />` at physical line start, asserting it
remains lexical content rather than being tokenized as JSX. Ensure the cases
exercise `jsxAtLineStart`, preserve lexical-range precedence, and continue
verifying reconstructed output.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fed2106b-fe9c-4abf-b638-4441f864ea9c
⛔ Files ignored due to path filters (1)
test/generated/tanstack-doc-fixtures.jsonis excluded by!**/generated/**
📒 Files selected for processing (15)
README.mddocs/guides/octane.mddocs/language-support.mddocs/reference/languages.mdscripts/language-utils.mjsscripts/test-package.mjsskills/_artifacts/domain_map.yamlskills/configure-selective-highlighting/references/languages.mdsrc/index.tssrc/internal/script.tssrc/languages/index.tssrc/languages/tsrx.tstest/fixtures.tstest/modular.test.tstest/regressions.test.ts
Adds dedicated TSRX/Octane language support instead of falling back to plaintext.
Changes
tsrxwith theoctanealias@{}component bodies and template directivesValidation
Summary by CodeRabbit
New Features
octanealias.Documentation
Bug Fixes