mirror of
https://github.com/astral-sh/ruff.git
synced 2025-07-24 13:34:40 +00:00
Preserve backslash in raw string literal (#6152)
This commit is contained in:
parent
a540933bc9
commit
0274de1fff
2 changed files with 71 additions and 11 deletions
|
@ -82,13 +82,11 @@ f"\"{a}\"{'hello' * b}\"{c}\""
|
|||
+f"NOT_YET_IMPLEMENTED_ExprJoinedStr"
|
||||
+f"NOT_YET_IMPLEMENTED_ExprJoinedStr"
|
||||
r"raw string ftw"
|
||||
-r"Date d\'expiration:(.*)"
|
||||
+r"Date d'expiration:(.*)"
|
||||
r"Date d\'expiration:(.*)"
|
||||
r'Tricky "quote'
|
||||
-r"Not-so-tricky \"quote"
|
||||
r"Not-so-tricky \"quote"
|
||||
-rf"{yay}"
|
||||
-"\nThe \"quick\"\nbrown fox\njumps over\nthe 'lazy' dog.\n"
|
||||
+r'Not-so-tricky "quote'
|
||||
+f"NOT_YET_IMPLEMENTED_ExprJoinedStr"
|
||||
+"\n\
|
||||
+The \"quick\"\n\
|
||||
|
@ -147,9 +145,9 @@ f"NOT_YET_IMPLEMENTED_ExprJoinedStr"
|
|||
f"NOT_YET_IMPLEMENTED_ExprJoinedStr"
|
||||
f"NOT_YET_IMPLEMENTED_ExprJoinedStr"
|
||||
r"raw string ftw"
|
||||
r"Date d'expiration:(.*)"
|
||||
r"Date d\'expiration:(.*)"
|
||||
r'Tricky "quote'
|
||||
r'Not-so-tricky "quote'
|
||||
r"Not-so-tricky \"quote"
|
||||
f"NOT_YET_IMPLEMENTED_ExprJoinedStr"
|
||||
"\n\
|
||||
The \"quick\"\n\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue