fix(html): handle escaped regex literals in astro frontmatter#9728
fix(html): handle escaped regex literals in astro frontmatter#9728dyc3 merged 3 commits intobiomejs:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 9350f15 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
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 |
dyc3
left a comment
There was a problem hiding this comment.
- link the issue in your pr description
- needs changeset
- must have ai disclosure if used
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThe HTML lexer’s QuotesSeen::check_byte was changed to move backslash (\) escape handling later in the control flow — after regex/comment opener detection and string-delimiter tracking — instead of toggling 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
|
Updated the PR description to link |
dyc3
left a comment
There was a problem hiding this comment.
Let's also add a snapshot test for this
Summary
Fixes #9696
Fix Astro frontmatter parsing for regex literals like
/\d{4}/.The lexer now resolves a deferred
/before generic escape handling, so regex literals starting with an escaped character are recognized correctly inside frontmatter.Test Plan
cargo test -p biome_html_parser quotes_seen -- --nocaptureDocs
Not applicable.