Open jonvanausdeln opened 3 weeks ago
This probably would involve contributing to Jedi (?) upstream.
This is defined in the Python grammar: https://github.com/posit-dev/positron/blob/cae259ea2ddd32c5f5eb7c8bc913adfe346842c9/extensions/python/syntaxes/MagicPython.tmLanguage.json#L1.
Which is vendored from this repo: https://github.com/MagicStack/MagicPython.
I see there's an issue there for this case: https://github.com/MagicStack/MagicPython/issues/259.
This is apparently a feature 😅 https://github.com/MagicStack/MagicPython/issues/114#issuecomment-349115524:
This is a feature.
foo = r'\nregexp' # this is parsed as a "regexp-string" bar = R'\nregexp' # this is parsed as a raw string
Currently Positron and VSCode still add syntax highlighting to string literal:
In this case,
bar
is a string literal and will gets automatically escaped correctly by python. I would like to see it not highlight the missing escapes, similiar to how PyCharm does it.