AdamNiederer / vue-html-mode

A major mode for editing vue templates
GNU General Public License v3.0
25 stars 3 forks source link

Allow dashes in html shorthands #6

Closed runarberg closed 7 years ago

runarberg commented 7 years ago

Such that attributes like :data-foo="bar" gets highlighted.

AdamNiederer commented 7 years ago

Do dashes in unions need backslashes before them? It looks like this regex works regardless, so this should be ok.

runarberg commented 7 years ago

Not when they are the first character, or the last, or if they immediately follow another range. It is recommended to put them as the first, or last character. However, I didn't do it here because I was following the president of vue-html-directive-regex below.