SublimeText / PackageDev

Tools to ease the creation of snippets, syntax definitions, etc. for Sublime Text.
MIT License
436 stars 83 forks source link

sublime-syntax (oniguruma regex): nested char classes aren't always scoped properly #95

Closed keith-hall closed 7 years ago

keith-hall commented 7 years ago

For example, this regex: (?:[[-\w]{{nonascii}}]|{{escape}})

It seems it detects the [-\w] as a range rather than a nested character class, and the ] is scoped as a literal. It gets it right if you remove the - or move it to after the \w.