atuttle / atom-language-cfml

:space_invader: A CFML Language for the Atom Editor
38 stars 24 forks source link

tag-generic-attribute-script doesn't allow underscores #121

Open boughtonp opened 6 years ago

boughtonp commented 6 years ago

Atom highlighting breaks when there's an underscore in an attribute, even though CF allows this.

The fix is probably changing the match regex from \\b([a-zA-Z0-9:-]+)\\b to \\b([a-zA-Z0-9_:-]+)\\b (or just \\b([\w:-]+)\\b).

However, that permits numbers colons and hyphen at the start of an attribute, which are all disallowed, so it should be \\b([a-zA-Z_][a-zA-Z0-9_:-]*)\\b (or \\b([a-zA-Z_][\w:-]*)\\b).

David-Polehonski commented 6 years ago

Could you add a test case for this, or attach an example snippet?