git.iko.soy/typeable/html-parse
on master help sign in
Fix unmatched pattern warning (found in last commit).
commit67450bc49363e355c928bba586054f9587c8bff6 authorMatthias Fischmann <mf@zerobuzz.net> dateMon 2 Jan 2017, 22:22 (10 years ago) parent70493df
1 file changed+8−7
Text/HTML/Parser.hs+8−7
Text/HTML/Parser.hs+8−7
@@ -300,13 +300,14 @@ renderTokens = mconcat . fmap renderToken
300300-- | (Somewhat) canonical string representation of 'Token'.
301301renderToken :: Token -> TL.Text
302302renderToken = TL.fromStrict . mconcat . \case
303− (TagOpen n []) -> ["<", n, ">"]
304− (TagOpen n attrs) -> ["<", n, " ", renderAttrs attrs, ">"]
305− (TagClose n) -> ["</", n, ">"]
306− (ContentChar c) -> [T.singleton c]
307− (ContentText t) -> [t]
308− (Comment builder) -> ["<!--", TL.toStrict $ B.toLazyText builder, "-->"]
309− (Doctype t) -> ["<!DOCTYPE", t, ">"]
303+ (TagOpen n []) -> ["<", n, ">"]
304+ (TagOpen n attrs) -> ["<", n, " ", renderAttrs attrs, ">"]
305+ (TagSelfClose n attrs) -> ["<", n, " ", renderAttrs attrs, " />"]
306+ (TagClose n) -> ["</", n, ">"]
307+ (ContentChar c) -> [T.singleton c]
308+ (ContentText t) -> [t]
309+ (Comment builder) -> ["<!--", TL.toStrict $ B.toLazyText builder, "-->"]
310+ (Doctype t) -> ["<!DOCTYPE", t, ">"]
310311
311312-- | See 'renderAttr'.
312313renderAttrs :: [Attr] -> Text