Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Escaped braces in f-strings not rendered properly #329

@baloe

Description

@baloe

Description

f-strings with escape braces (i.e. '{{' instead of '{') are not rendered correctly.

Here is a code snippet that shows this glitch:

a=1.1
b='g'
f'{a:{b}}'     # → '1.1'
f'{{{a:{b}}}}' # → '{1.1}'
f'{{{a}}}'     # → '{1.1}'

Here is how it is rendered in atom:
Screenshot

I would expect the characters {a:{b}} to be rendered equally in lines 3-4 and {a} rendered non-green, but this does not happen.

Versions

language-python version 0.53.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions