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: F-string support #1636

Closed
RunDevelopment opened this issue Nov 29, 2018 · 0 comments · Fixed by #1642
Closed

Python: F-string support #1636

RunDevelopment opened this issue Nov 29, 2018 · 0 comments · Fixed by #1642

Comments

@RunDevelopment
Copy link
Member

The python language definition does not support strings interpolation aka. f-strings.

mAAdhaTTah pushed a commit that referenced this issue Dec 2, 2018
This PR adds support for [string interpolation](https://www.python.org/dev/peps/pep-0498/) (aka. f-strings) and makes the [string prefixes](https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals) part of the string.

Resolves #1636.

### Known issues

Assumes that strings inside the interpolation expression are 'nice'. So strings
with unfortunate numbers of curley braces will cause incorrect highlighting: E.g.: `f"{'}'}"`.
ggrossetie pushed a commit to ggrossetie/prism that referenced this issue Mar 11, 2019
This PR adds support for [string interpolation](https://www.python.org/dev/peps/pep-0498/) (aka. f-strings) and makes the [string prefixes](https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals) part of the string.

Resolves PrismJS#1636.

### Known issues

Assumes that strings inside the interpolation expression are 'nice'. So strings
with unfortunate numbers of curley braces will cause incorrect highlighting: E.g.: `f"{'}'}"`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant