Don't generate trailing slash for void tags

This commit is contained in:
Nathan McCarty 2025-02-21 05:43:34 -05:00
parent c11bf35cc8
commit 67a07a0523

View file

@ -63,8 +63,8 @@ namespace Html
if length attributes > 0
then
let attrs = joinBy " " $ map toString attributes
in "\{indent}<\{type} \{attrs} />"
else "\{indent}<\{type} />"
in "\{indent}<\{type} \{attrs}>"
else "\{indent}<\{type}>"
viewIndented indent_level (Normal type attributes {content_types} contents) =
let indent = replicate (indent_level * 2) ' ' in
-- Special handling if the tag contains exactly one `Text` element, we won't