-
Notifications
You must be signed in to change notification settings - Fork 591
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] whitespace around =
formatter in f-strings
#3216
Comments
Wow! I didn't even know this
That |
@jfcherng you may find some more info: https://bugs.python.org/issue36817. There are also some official docs. |
=
formatter in f-strings
Initially implemented in #2006. I just did some quick testing and it appears that only whitespace (space, tab and even newline in block strings) is allowed and preserved here. Any token before Note that the embedded |
=
formatter in f-strings=
formatter in f-strings
Fixes: sublimehq#3216 This commit ... 1. uses multi-push to not push into python expression context twice. see: https://docs.python.org/3.6/reference/lexical_analysis.html#f-strings 2. adds requested support for surrounding whitespace of `=` debug modifier. 3. adds named contexts and re-uses common modifier patterns in both f-string contexts.
Fixes: #3216 This commit ... 1. uses multi-push to not push into python expression context twice. see: https://docs.python.org/3.6/reference/lexical_analysis.html#f-strings 2. adds requested support for surrounding whitespace of `=` debug modifier. 3. adds named contexts and re-uses common modifier patterns in both f-string contexts.
@deathaxe I don't find anything change after I upgrade SUBL to version 4128. |
@sweettyler Syntax highlighting changes are not included in every ST release. The changelog will mention them if they are new. To apply the changes for now, you can follow the ReadMe instructions at the root of this repo or use something like OverrideAudit to change just the |
@michaelblyons Thank you! I see now. |
Fixes: sublimehq#3216 This commit ... 1. uses multi-push to not push into python expression context twice. see: https://docs.python.org/3.6/reference/lexical_analysis.html#f-strings 2. adds requested support for surrounding whitespace of `=` debug modifier. 3. adds named contexts and re-uses common modifier patterns in both f-string contexts.
What happened?
I tried some new features introduced in Python 3.8, and happened to find that, in the example (attached screenshot), the "=" are highlighted differently, depending on if there is a blank behind it.
Guess there is something wrong.
In VS code "=" has the same color in both print.
The text was updated successfully, but these errors were encountered: