Skip to content

Bugfix for the rendering of tags that have a namespace but no other attributes. #11

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Halogen/VDom/StringRenderer.purs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ render getTagType renderAttrs renderWidget = go
as = renderAttrs attrs
as' = maybe as (\(Namespace ns) -> "xmlns=\"" <> escape ns <> "\"" <> if S.null as then "" else " " <> as) maybeNamespace
in
"<" <> name <> (if S.null as then "" else " ") <> as' <>
"<" <> name <> (if S.null as' then "" else " ") <> as' <>
if A.null children
then if getTagType elemName == SelfClosingTag then "/>" else "></" <> name <> ">"
else ">" <> S.joinWith "" (map go children) <> "</" <> name <> ">"