Skip to content

f-string syntax highlighting does not work in Pybricks Code #875

@dlech

Description

@dlech

Describe the bug
Syntax highlighting of f-strings treats {} and everything inside it as part of the string.

To reproduce

Pybricks Code 2.1.0-beta.1

Steps to reproduce the behavior:

  1. Type in some code like print(f"battery: {hub.battery.voltage() / 1000:.3f}V")

Expected behavior
The code in the {} should not be green.

Screenshots
image

Metadata

Metadata

Assignees

Labels

software: pybricks-codeIssues with https://code.pybricks.com application

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions