jmurphyau / language-ember-htmlbars

Other
5 stars 2 forks source link

Does not correctly handle angle brackets w/ subcomponents #12

Open eelke opened 4 years ago

eelke commented 4 years ago

Not sure how to describe the issue, but I ran into it using ember-google-maps so I'll use that as an example:

container.hbs:

<GMap as |g|>
    <SomeCustomComponent @locations={{this.model.locations}} @g={{g}} />
    ...
</GMap>

some-custom-component.hbs:

{{each @locations as |location|}}
    {{!-- gets parsed and coloured correctly: --}}
    {{g.marker lat=location.lat lng=location.lng}}

    {{!-- does not get parsed correctly: --}}
    <@g.marker @lat={{location.lat}} @loc={{location.lng}} />
{{/each}}

Note the @ at the beginning of the tag. Without it the code does not work, but gets coloured correctly:

Example image