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

Raw string formatting should not remove quote escape backslahes #6186

Closed
konstin opened this issue Jul 31, 2023 · 2 comments
Closed

Raw string formatting should not remove quote escape backslahes #6186

konstin opened this issue Jul 31, 2023 · 2 comments
Labels
bug Something isn't working formatter Related to the formatter

Comments

@konstin
Copy link
Member

konstin commented Jul 31, 2023

Currently, print(r"\"" + "|" + r"\"''") gets formatted as print(r'"' + "|" + r"\"''"), but raw strings keep the backslash so they not equivalent:

> print(r"\"" + "|" + r"\"''")
\"|\"''
> print(r'"' + "|" + r"\"''")
"|\"''
@konstin konstin added bug Something isn't working formatter Related to the formatter labels Jul 31, 2023
@MichaReiser
Copy link
Member

Is this the same as #5941?

@konstin
Copy link
Member Author

konstin commented Jul 31, 2023

yes 🙈

@konstin konstin closed this as completed Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working formatter Related to the formatter
Projects
None yet
Development

No branches or pull requests

2 participants