We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0895b49 commit 8310b60Copy full SHA for 8310b60
src/Miso/From/Html.hs
@@ -119,6 +119,10 @@ instance Show HTMLAttr where
119
, T.unpack v
120
, "\" "
121
]
122
+ show (HTMLAttr x@(T.isPrefixOf "data-" -> True) Nothing) =
123
+ case T.stripPrefix "data-" x of
124
+ Just rest -> "data_ " <> "\"" <> T.unpack rest <> "\"" <> " \"\""
125
+ Nothing -> T.unpack x
126
show (HTMLAttr "checked" Nothing) =
127
"checked_ True"
128
show (HTMLAttr k Nothing) =
0 commit comments