You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
When you put double hyphens (--) inside multi-line comment blocks in XML files, it breaks the syntax highlighting.
Opinion
Per the following information:
[Definition: Comments may appear anywhere in a document outside other markup; in addition, they may appear within the document type declaration at places allowed by the grammar. They are not part of the document's character data; an XML processor may, but need not, make it possible for an application to retrieve the text of comments. For compatibility, the string " -- " (double-hyphen) must not occur within comments.] Parameter entity references must not be recognized within comments.
This is correct indication or correct response to an invalid -- inside XML comments, however, it should only highlight the offending -- in red, but keep the rest of the code with correct syntax highlighting, so it doesn't highlight the remaining code after the offending -- to be green entirely.
Steps to Reproduce:
Copy paste the following XML code in a new XML document in Visual Studio Code:
<?xml version="1.0" encoding="utf-8"?>
<Foo>
<Class>
<!-- This is a comment -->
<Bar>Hello world</Bar>
<!-- This is a multiple-lines comment. Hello comment!-->
<Baz>Goodbye world.</Baz>
<!-- This is a multiple-lines comment with double hyphens inside it. ---->
<Error>Highlighting parsing error</Error>
</Class>
</Foo>
Observe syntax highlighting breaks after "Goodbye World.".
Image
Does this issue occur when all extensions are disabled?: Yes
Does this issue occur when one of the extensions is disabled?: Yes