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

Python: Not needed syntax highlighting for string literals #3387

Open
jonvanausdeln opened this issue Jun 4, 2024 · 2 comments
Open

Python: Not needed syntax highlighting for string literals #3387

jonvanausdeln opened this issue Jun 4, 2024 · 2 comments
Labels
enhancement New feature or request lang: python
Milestone

Comments

@jonvanausdeln
Copy link
Contributor

Currently Positron and VSCode still add syntax highlighting to string literal:

image

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.

image

@jonvanausdeln jonvanausdeln added enhancement New feature or request lang: python labels Jun 4, 2024
@juliasilge juliasilge added this to the Future milestone Jun 10, 2024
@juliasilge
Copy link
Contributor

This probably would involve contributing to Jedi (?) upstream.

@seeM
Copy link
Contributor

seeM commented Jun 11, 2024

This is defined in the Python grammar:

.

Which is vendored from this repo: https://github.com/MagicStack/MagicPython.

I see there's an issue there for this case: MagicStack/MagicPython#259.

This is apparently a feature 😅 MagicStack/MagicPython#114 (comment):

This is a feature.

foo = r'\nregexp'  # this is parsed as a "regexp-string"
bar = R'\nregexp'  # this is parsed as a raw string
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lang: python
Projects
None yet
Development

No branches or pull requests

3 participants