It seems like Lezer (I guess) isn’t correctly parsing that self-closing tags are closed and starts to recognize anything after as “content”. There have to be two self-closing tags together for the syntax highlighting to be compromised.
I’m at a bit of a loss here. I’ve tried isolating things down as much as I can and reducing to just loading HTML from language-data and a simple theme, but the tag detection is still off with self-closing tags.
Unfortunately if I’m just loading lang-html or language-data in some kind of online editor, it doesn’t happen. I suspect it has to do with very specific package versions and some kind of conflict. I’m already doing a lot to try to lock in specific versions to prevent conflicts and it doesn’t seem like I have any mis-matched versions when I do yarn list.
@lezer/xml is at 1.0.5. I’m not sure why you are getting 1.0.1 on a fresh install. (I recommend dropping yarn for npm in general — recent npm versions do most of the things that yarn can do, and are less buggy.)
That’s not the same issue. Those aren’t SVG tags. HTML doesn’t support self-closing tags. You can turn it on with an option to html(), but browsers don’t work this way.
Oh, right, that’s not exposed directly yet. You have to enable the "selfClosing" dialect in the HTML parser (htmlLanguage.configure({dialect: "selfClosing"})) to get this behavior.