davidrios / pug-tmbundle

A comprehensive textmate / sublime text bundle for the Pug (formerly Jade) template language.
https://github.com/davidrios/pug-tmbundle
MIT License
48 stars 20 forks source link

Regex: unmatched parenthesis #33

Closed kjvdven closed 3 years ago

kjvdven commented 3 years ago

I was looking at the Pug.JSON-tmLanguage file, trying to figure out if I could add to the NOVA plugin. And checking the regex for name, class and id and I got an unmatched parenthesis. Is that correct?

https://regex101.com/r/RgVEOU/1

davidrios commented 3 years ago

That's because the regex backslashes have to be escaped in the JSON file. Just replace all \\ by \ and you are good. Don't forget to escape them again (replace all \ by \\) if you copy it from that site.