textmate / html.tmbundle

TextMate support for HTML
75 stars 95 forks source link

Incorrect HTML Syntax highlighting on SVG with Line break #101

Open alexr00 opened 5 years ago

alexr00 commented 5 years ago

From @marcelcremer on January 29, 2019 13:17

Steps to Reproduce:

Insert the following code in an HTML-File:

<div>
    <svg class="fi">
        <use xlink:href="/assets/feather/feather-sprite.svg#edit" /></svg
        >
</div>

Mind the Line break between \<\/svg and >.

The syntax highlighting will break for everything after the SVG: image

Found through strange SVG formatting by prettier: https://github.com/prettier/prettier/issues/5541

Does this issue occur when all extensions are disabled?: Yes

Copied from original issue: Microsoft/vscode#67402

alexr00 commented 5 years ago

According to the spec this is valid HTML but the closing tag is categorized as invalid.illegal.unrecognized-tag.html

johnsoncodehk commented 3 years ago

I have tried to fixed this problem in VSCode, but they pointing the problem to this repo.

If someone interested in the resolve, please see https://github.com/microsoft/vscode/pull/124220.

starball5 commented 1 year ago

Related on Stack Overflow: Why does VS Code mark closing HTML tags with space between the tag name and the right angle bracket as invalid?.