diff --git a/src/Text/Taggy/Parser.hs b/src/Text/Taggy/Parser.hs index 3822f8e..3c4f943 100644 --- a/src/Text/Taggy/Parser.hs +++ b/src/Text/Taggy/Parser.hs @@ -123,9 +123,15 @@ attributes cventities = postProcess `fmap` go emptyL tagends = skipSpace >> parseEnd - parseEnd = ("/>" *> return True) + parseEnd = autoClosing <|> (">" *> return False) + autoClosing = do + char '/' + skipSpace + char '>' + return True + postProcess (l, b) = (toList l, b) attribute :: Bool -> Parser Attribute