Skip to content

Conversation

@backport-action
Copy link
Collaborator

Description

Backport of #930 to 1.17.

relates to #883 #879
original author: @saig0

(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 merged commit 2a4ea4c into 1.17 Sep 25, 2024
4 checks passed
@saig0 saig0 deleted the backport-930-to-1.17 branch September 25, 2024 11:53
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.

3 participants