Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 1.16] fix: Handle escape and regex characters #934

Closed
wants to merge 5 commits into from

Conversation

saig0
Copy link
Member

@saig0 saig0 commented Sep 26, 2024

Description

Backport of #930 to 1.16.

relates to #883 #879

Align with version 1.17 and migrate the test class to the new test style. This refactoring eases the backporting of upcoming bug fixes.
(cherry picked from commit c8b01bd)
(cherry picked from commit 58efca9)
Correct the handling of escape sequences in string literals.

Don't replace escape sequences in regex expressions, for example, \r or \n. In the parser, these sequences start with \\. Same for \s, don't replace it with a whitespace, since this is also a part of a regex.

Handle \\ to avoid that the sequence is escaped and returned as \\\\.

(cherry picked from commit d266e80)
@saig0 saig0 changed the base branch from main to 1.16 September 26, 2024 04:14
@saig0 saig0 closed this Sep 26, 2024
@saig0
Copy link
Member Author

saig0 commented Sep 26, 2024

The CI workflows were not triggered. Let's recreate the PR.

@saig0 saig0 deleted the 930-backport-1.16 branch September 26, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant