Skip to content

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

@keith-hall

Description

@keith-hall

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.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions