You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
Use Cases
Today the backslash (\) behavior inside raw strings can be confusing / inconsistent. The docs claim that backslashes have "no special meaning", however a backslash currently causes the parser to always include the next character (including the backslash itself). That means a blackslash can be used to include a single quote inside of a raw string, but this comes with some odd edge cases:
A single quote can't be included in a raw string without a leading backslash
The last character of a raw string cannot be a backslash
It would be nice if these restrictions could be lifted and a backslash actually had no special meaning.
Proposal
One possible solution is to allow raw string literals similar to Rust, where you can create a custom delimiter out of multiple characters, which would allow anything to be used inside of the raw string literal.
Version
0.23.0
The text was updated successfully, but these errors were encountered:
A note for the community
Use Cases
Today the backslash (
\
) behavior inside raw strings can be confusing / inconsistent. The docs claim that backslashes have "no special meaning", however a backslash currently causes the parser to always include the next character (including the backslash itself). That means a blackslash can be used to include a single quote inside of a raw string, but this comes with some odd edge cases:It would be nice if these restrictions could be lifted and a backslash actually had no special meaning.
Proposal
One possible solution is to allow raw string literals similar to Rust, where you can create a custom delimiter out of multiple characters, which would allow anything to be used inside of the raw string literal.
Version
0.23.0
The text was updated successfully, but these errors were encountered: