daaain / Handlebars

Fullest Handlebars.js templating support for Sublime Text 2 / 3. Also drives syntax colouring on Github and in Visual Studio Code. Install from: https://packagecontrol.io/packages/Handlebars.
MIT License
301 stars 48 forks source link

Syntax highlighting glitch #105

Open mcandre opened 4 years ago

mcandre commented 4 years ago

Long lines can sometimes confuse the parser:

{{#if active}}<span>{{else}}<a {{#if id}}id="{{id}}"{{/if}} href="{{{url}}}">{{/if}}{{#if img}}<img class="desaturate" id="{{img.id}}" src="{{img.src}}" alt="{{img.alt}}" width="{{img.width}}" height="{{img.height}}" />{{/if}}{{name}}{{#if active}}</span>{{else}}</a>{{/if}}

The img closing bracket /> is where highlighting messes up and mistakenly highlights that and the rest of the line as HTML attribute color.

Whereas GitHub's own syntax highlighting correctly highlights the whole line!