Repository navigation
fix(parser): preserve regex literals ending in an escaped slash - #738
Closed
nagahara-naoki wants to merge 1 commit into
Closed
nagahara-naoki wants to merge 1 commit into
nagahara-naoki wants to merge 1 commit into
Conversation
Member
|
Thanks a lot for this fix, @nagahara-naoki! This PR doesn't allow edits from maintainers, so I couldn't push the follow-up changes to your branch. That means I have to close it here. Your commit is kept as is, with you as the author, in #740. That PR adds 3 commits on top:
Next time, please tick "Allow edits by maintainers" so we can update the PR directly. Thanks again! |
Contributor
Author
|
@Brooooooklyn I’ll make sure maintainer edits are enabled on my next PR! |
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.
Fix regex literals ending in an escaped slash
This Angular template removes one leading slash when the button is clicked:
Before: Oxc treated the last two slashes in
/^\//as a comment and failed to compile the template withUnterminated regular expression.After: Oxc parses the regex and ignores the trailing
// normalize pathcomment. Clicking the button produces:pathbefore clickresultafter click"/docs""docs""//docs""/docs""docs""docs"Event source ranges
The event handler’s source range now extends through
// normalize path. The parsed assignment’s range starts atresultand ends at). Regression tests check both positions and cover event attributes that contain HTML character references such as".Tests