angular / vscode-ng-language-service

Angular extension for Visual Studio Code
MIT License
781 stars 117 forks source link

Syntax highlighting breaks when a line break appears within a template #1998

Open a-stewart opened 9 months ago

a-stewart commented 9 months ago

Example:

<h2>This is a test file</h2>

<b>Hello {{ name }}!</b> This is a very long string just to say that today is {{today | date: 'MMM
d, y, h:mm a'}}

<div>
  There is more HTML here

  <div>
    Nested divs are cool!
    <div>(sometimes)</div>
  </div>
</div>

Renders as follows.

image

atscott commented 9 months ago

Is splitting a single quoted string across multiple lines actually allowed? Even though there might not be a compiler error, I’m inclined to say this is working as expected or at the very least, extremely low priority. Potentially this should be a bug in the compiler instead for not reporting an error here.