Skip to content

Commit 76d4e58

Browse files
authored
Account for special SVG tags (#19)
* Account for special SVG tags * Refactor show instance for HTML nodes * Flake bump
1 parent 50b2a24 commit 76d4e58

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

flake.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Miso/From/Html.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ data HTMLAttr = HTMLAttr Text (Maybe Text)
5353
-----------------------------------------------------------------------------
5454
instance Show HTML where
5555
show (TextNode x) = "\"" <> T.unpack x <> "\""
56+
show (Node _ "path" as _) = show (Node False "path" as [])
57+
show (Node _ "rect" as _) = show (Node False "rect" as [])
58+
show (Node _ "circle" as _) = show (Node False "circle" as [])
59+
show (Node _ "polyline" as _) = show (Node False "polyline" as [])
60+
show (Node _ "line" as _) = show (Node False "line" as [])
5661
show (Node isOpen t as cs) =
5762
mconcat $
5863
[ T.unpack t

0 commit comments

Comments
 (0)