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
Yes, that's annoying feature of htm, stumbled upon that myself many times. <input>, <img> etc oftentimes come unclosed, and just copy-pasting html to htm breaks rendering silently.
@masx200 I’m not a contributor, but AFAIK htm doesn’t throw an error on parse errors because htm prioritizes size.
(BTW, I don’t think there are lots of Chinese people here, Mandarin text reduces the readability of the text. If you would really like to provide a Chinese translation, please add it at the end of the issue)
Correct - developer ergonomic features like parse/tree errors should be implemented in an editor, not in a library paid for at runtime. I'd recommend using the lit-html plugin for VSCode.
In general, HTM 1 was better suited to the use-case described here, since it was built on top of the DOM's own HTML parser. You can find a similar solution for Preact (and likely React) in preact-markup.
An exception occurred when parsing an unclosed label using htm, but no error was reported.
This leads to the wrong virtual dom object.
An exception occurred when parsing an unclosed label with "htm", but no error was reported.
This resulted in the wrong "virtual dom" object.
The 'meta' and 'link' tags above are not closed
The 'meta' and 'link' tags above are not closed
An exception occurred !
The correct output should look like this.
The correct output should look like this.
The text was updated successfully, but these errors were encountered: