MagicStack / MagicStack/MagicPython
Incorrect function highlighting in raw format (rf) string
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
I'm getting some incorrect highlighting inside an rf string, in particular for the `.` and `(1)` portions, as well as the curly braces. Take a look:
* **Editor name and version**: VSCode
* **Platform**: Windows
* **Color scheme**: Default
* **MagicPython version**: v1.1.0
* **A sreenshot**:

* **5-10 lines of surrounding code**:
```
for item in (
re.split(rf" ?\r
(?=\d+{match.group(1)})", text)
if (match := re.match(r"1( ?[-.])", text)) is not None
else [text]
):
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the supplied raw-format string in the supported editor and compare highlighting of the dot, `(1)`, and curly braces. Trace the syntax-highlighting behavior for this example; done means those portions are highlighted consistently with the surrounding Python expression.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100