mustache / vim-mustache-handlebars

mustache and handlebars mode for vim
mustache.github.io
455 stars 49 forks source link

Handlebars that are part of bare htmlValue break syntax highlighting #69

Closed jsit closed 5 years ago

jsit commented 5 years ago

Enter this text in Vim:

<p class="paragraph">Lorem ipsum dolor sit amet</p>

<div class={{"handlebars-stuff asdf"}} class="asdf">

  <p class="paragraph">Lorem ipsum dolor sit amet</p>

</div>

You should see some broken syntax highlighting, like so:

screen shot 2018-11-23 at 12 24 53 pm 1

This is because htmlValue in the native html syntax file doesn't allow spaces unless they are enclosed in quotes; but bare handlebars are allowed to be an html value.

(It is highlighting handlebars-stuff as htmlValue, the first asdf as htmlTag, and class as htmlString, and the second asdf as htmlTag.)