-
Notifications
You must be signed in to change notification settings - Fork 39
Hash sign breaks highlighting #114
Comments
The issue is the language-yaml/grammars/yaml.cson Line 132 in 821c7f1
|
It's been quite a while since I touched these regexes but looking at the line you linked, we're not being strict enough about hitting a comment. We break as soon as a # is found, even though the spec says "Comments must be separated from other tokens by white space characters". Maybe something like this would work: |
I've messed around with a regex for this and like the many other times I've tried to figure out how to negate multiple characters, but can't figure out how to do it. It would probably be more easier and accurate to have a comment token overwrite all the other tokens. |
So I realized that negating multiple characters is very hard, but explicitly capturing the "space with everything except a # after it" is easier. |
That seems like it could work |
@Nixinova would you mind creating a PR? If not I can go and setup my environment again and do it :). |
Removing most of the checklist as I'm not using atom, I'm using the grammar file directly.
Description
The syntax grammar does not correctly tokenise properties with hashes inside them:
This syntax is valid and should be shown as such.
The text was updated successfully, but these errors were encountered: