more forgiving auto-closing tag detection

This commit is contained in:
Alp Mestanogullari 2014-06-16 16:37:20 +02:00
parent 7bf1e35232
commit 22bec0911a

View File

@ -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