← Winnitude! Search  ·  Reader Mode (1283 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 6 LINKS

Python f-string syntax highlighting error · Issue #275 · MagicStack/MagicPython

Repository navigation

Python f-string syntax highlighting error  #275


New issue

New issue

Open

Open
Python f-string syntax highlighting error #275

Description

@ImAurDev's profile ImAurDev opened on May 3, 2026

In Python files, the syntax highlighting for f-strings is incorrect when the f-string's expression contains a newline.

print(f"{1
}foo") # new line in brace, highlighting incorrect
print(f"{1}bar")
Reacted by 你好陌生人,你是给,我是给

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