Handlebars icon indicating copy to clipboard operation
Handlebars copied to clipboard

Syntax highlighting glitch

Open mcandre opened this issue 6 years ago • 0 comments

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!

mcandre avatar Aug 14 '19 15:08 mcandre