ryboe / CSS3

The most complete CSS support for Sublime Text
MIT License
189 stars 28 forks source link

trying to add CSS3.sublime-syntax to bat gives Oniguruma error #224

Closed brenton-at-pieces closed 3 months ago

brenton-at-pieces commented 3 months ago

Following the instructions for a syntax to bat listed here, I get this error with CSS3.sublime-syntax:

% bat cache --build
No themes were found in '/Users/brenton/.config/bat/themes', using the default set
[bat error]: /Users/brenton/.config/bat/syntaxes/CSS3/CSS3.sublime-syntax: Error while compiling regex '(?=[\w.:#*-&])': Oniguruma error: empty range in char class

I believe this is because of the 3 occurrences of *-& appearing in a [] character class without being escaped, and thus being assumed to be [a-z] range notation.

Changing the occurrences to be *\-& allows Oniguruma to succeed and CSS3.sublime-syntax to be added to bat.