sublime-syntax single quote escapes followed by quantifier chars inside sets

Open
#94 6 comments 1 reaction 1 assignee View on GitHub

@FichteFoll is already working on this.

Since Sep 9, 2024.

Assessment

This issue has not been assessed yet.

Description

defect

In a sublime-syntax file, if the regex is single quoted, and contains a set, and that set contains an escaped single quote, if a character that is normally a valid quantifier immediately follows it, that character is scoped as a quantifier when it shouldn't be - because it is inside a set.

Example: add a star after the ' here: https://github.com/sublimehq/Packages/blob/7ef80d531b752baee46f792b6bc6b26206e56012/Rust/Rust.sublime-syntax#L383

to get:

- match: '(?=>|[^ \t\n\$=<_+''*(),&:\[\][:alnum:]])'

and you will see the * is scoped as keyword.operator.quantifier.regexp when it shouldn't be.

Dominant language
Python
Stars
455
Forks
86
Avg merge
7d 10h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SublimeText/PackageDev

All issues in SublimeText/PackageDev

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.