Closed jasikpark closed 1 year ago
though hmm maybe they always permit children? https://github.com/fb55/htmlparser2/issues/187
would be nice for empty nodes to be rendered in the more concise way though, are there any elements that can't be reduced to </>
instead of <></>
when empty?
would be nice for empty nodes to be rendered in the more concise way though, are there any elements that can't be reduced to
</>
instead of<></>
when empty?
Hmm, most HTML elements, I think! I might be able to add something in the AST that signals if something was self-closing as authored, though.
https://github.com/natemoo-re/ultrahtml/blob/2cb77629b075799c7da03742bf7c7dd7681d9166/src/index.ts#L86
should include svg void tags like path
I'll try to find the full list
Looking to solve https://github.com/jasikpark/astro-svg-loader/issues/58 which depends on the wonderful ultrahtml :p