Title: Python f-string syntax highlighting error · Issue #275 · MagicStack/MagicPython · GitHub
Open Graph Title: Python f-string syntax highlighting error · Issue #275 · MagicStack/MagicPython
X Title: Python f-string syntax highlighting error · Issue #275 · MagicStack/MagicPython
Description: 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")
Open Graph Description: 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")
X Description: 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(...
Opengraph URL: https://github.com/MagicStack/MagicPython/issues/275
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Python f-string syntax highlighting error","articleBody":"In Python files, the syntax highlighting for f-strings is incorrect when the f-string’s expression contains a newline.\n\n```python\nprint(f\"{1\n}foo\") # new line in brace, highlighting incorrect\nprint(f\"{1}bar\")\n```","author":{"url":"https://github.com/ImAurDev","@type":"Person","name":"ImAurDev"},"datePublished":"2026-05-03T12:25:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/275/MagicPython/issues/275"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9f31950b-b43f-86a5-3b86-2924404cf637 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8CE8:2BD050:1993ED:256A38:6A636538 |
| html-safe-nonce | 71c94d9387adfcc2b25608866c758cee96a78c12a2b2b1c65db4baaea9aa62ad |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0U4OjJCRDA1MDoxOTkzRUQ6MjU2QTM4OjZBNjM2NTM4IiwidmlzaXRvcl9pZCI6IjcyNTU1NDMzNTA3NTgxNzE5NjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a86282b181f55048d92f99aa1a804fa60fcf2adccac89422bfdca4cb00b9359b |
| hovercard-subject-tag | issue:4371790237 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/MagicStack/MagicPython/275/issue_layout |
| twitter:image | https://opengraph.githubassets.com/72f2f305a6149a274830e72b396b2570ab9e975a069cdca2ca60037c1ecb31b2/MagicStack/MagicPython/issues/275 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/72f2f305a6149a274830e72b396b2570ab9e975a069cdca2ca60037c1ecb31b2/MagicStack/MagicPython/issues/275 |
| og:image:alt | 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") |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ImAurDev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 669d3fcd704a169521d2b6431762f95a6878a9e8ccaf0fd5f2d0802fc5b971f9 |
| turbo-cache-control | no-preview |
| go-import | github.com/MagicStack/MagicPython git https://github.com/MagicStack/MagicPython.git |
| octolytics-dimension-user_id | 14324950 |
| octolytics-dimension-user_login | MagicStack |
| octolytics-dimension-repository_id | 43982620 |
| octolytics-dimension-repository_nwo | MagicStack/MagicPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 43982620 |
| octolytics-dimension-repository_network_root_nwo | MagicStack/MagicPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 20da292f132ff51328be50073854259f417052c1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width