billymoon / Stylus

Stylus Package for Sublime Text 2 / 3
Other
129 stars 31 forks source link

grammar: Escape ampersands #83

Closed vmg closed 6 years ago

vmg commented 6 years ago

Hey there! As you may know, we use this Stylus package to provide syntax highlighting for Stylus files in GitHub.

I'm currently working on improving the way we load and perform syntax highlighting on the website, and I've noticed that there's an issue in the existing grammar which is chocking our new parser.

Specifically: the & character, even when inside a regexp comment, needs to be escaped as &. This is a requirement for XML.

The proposed change fixes the issue in a backwards-compatible way. I'd appreciate if you could merge it. Thank you!

grassator commented 6 years ago

@vmg thank you for making the PR, however the .tmLanguage file is generated from .yml file so this should be fixed there or in the transformation phase, otherwise it will be broken with the next change.

vmg commented 6 years ago

@grassator: Right on! Sorry, I overlooked the source YML file. Should be fixed now.

grassator commented 6 years ago

Thanks again for the contribution and great to see this project being useful for people.