Preserve backslash in raw string literal (#6152)

This commit is contained in:
Harutaka Kawamura 2023-07-31 21:48:17 +09:00 committed by GitHub
parent a540933bc9
commit 0274de1fff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 71 additions and 11 deletions

View file

@ -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\