Skip to content

Commit

Permalink
Merge pull request #12 from Hasnep/remove-xhtml-compatibility
Browse files Browse the repository at this point in the history
Remove XHTML compatibility
  • Loading branch information
Hasnep authored May 15, 2024
2 parents 399cdb8 + cfbfb5c commit 730eaf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Html.roc
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ expect
expect
exampleDocument = html [] [body [] [base [], link [], meta [], embed [], source [], input [], area [], img [], track [], br [], wbr [], col [], hr []]]
out = render exampleDocument
out == "<!DOCTYPE html><html><body><base/><link/><meta/><embed/><source/><input/><area/><img/><track/><br/><wbr/><col/><hr/></body></html>"
out == "<!DOCTYPE html><html><body><base><link><meta><embed><source><input><area><img><track><br><wbr><col><hr></body></html>"

## Render a Node to a string, without a `!DOCTYPE` tag.
renderWithoutDocType : Node -> Str
Expand Down Expand Up @@ -289,7 +289,7 @@ renderHelp = \buffer, node ->
withTagName
else
List.walk attrs withTagName renderAttr
|> SafeStr.concat (dangerouslyMarkSafe "/>") # Use self-closing tag syntax for compatibility with XHTML
|> SafeStr.concat (dangerouslyMarkSafe ">") # Don't use self-closing tag syntax for void elements

_ ->
buffer
Expand Down

0 comments on commit 730eaf0

Please sign in to comment.