Repository navigation
Handle flag-u character classes when Unicode sets are disabled - #39
Open
tanveerchana wants to merge 1 commit into
Open
tanveerchana wants to merge 1 commit into
tanveerchana wants to merge 1 commit into
Conversation
Normalize literal class openers before extended-syntax parsing and preserve character-class context across template fragments. Support flags in direct internal plugin calls. Add issue slevithan#30 regressions.
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.
With
disable.v: trueandunicodeSetsPlugin: null,rewrite("(?>[[])", options)leaves the atomic group unreplaced and produces a pattern that throwsInvalid groupunder flag u. Parsers assume every unescaped[starts a nested class, although it is a literal inside a flag-u class.Normalize literal class openers to
\[before extended-syntax parsing. Carry class context across raw template fragments and interpolated patterns, skip flag-x comments, and pass Unicode-set mode to plugins. Direct atomic, possessive and subroutine plugin calls also honor flag u.Fixes #30.
Validation on Linux / Node.js 24.22.1:
Invalid group; interpolation checks also exposed a missing context case before the final fix.npm exec --yes pnpm@10.30.3 -- test: 238 specs, 0 failures; TypeScript tests and ATTW package checks passed. Includes builds and declaration generation.git diff --checkpassed.