HTML comments with multiple hyphens confuse the wikitext interpreter
Californ1a opened this issue · 3 comments
It may be invalid in terms of proper XHTML syntax, but no wiki I know of breaks the syntax highlighting on-site if you don't follow that convention:
Wikipedia uses ■ instead of extra hyphens for spacing in their sandbox comment, but adding extra hyphens doesn't break the syntax highlighting:
Some probably have style guide policies for how comments should be formatted, but the syntax highlighting in the editor itself won't/shouldn't break if you don't follow those policy conventions. As far as I can tell, even Wikipedia's MOS never specifically mentions not to add more than 2 hyphens - it's not mentioned on either MOS:COMMENT or on MOS:HIDDEN.
The VSC theme I use is Atom one dark, but the standard HTML lang syntax highlighting doesn't break:
However, if I change the lang to XML, then it does:
To me, this is similar to leaving off the self-closing tag on <br />
, <img />
etc., which is also invalid in proper XHTML, but the syntax highlighting shouldn't care about that because it's more of a style preference that should be a linter config rather than breaking syntax highlighting.
Well, I agree with you. After thinking about it, I decided to remove this restriction.