@@ -53,6 +53,8 @@ type AttrValue = Text
54 -- | An opening tag. Attribute ordering is arbitrary.
54 -- | An opening tag. Attribute ordering is arbitrary.
55 = TagOpen !TagName [Attr]
55 = TagOpen !TagName [Attr]
56+ -- | A self-closing tag.
57+ | TagSelfClose !TagName [Attr]
56 -- | A closing tag.
58 -- | A closing tag.
57 | TagClose !TagName
59 | TagClose !TagName
58 -- | The content between tags.
60 -- | The content between tags.
@@ -129,7 +131,7 @@ tagName' = do
129-- | /§8.2.4.43/: Self-closing start tag state
131-- | /§8.2.4.43/: Self-closing start tag state
130selfClosingStartTag :: TagName -> [Attr] -> Parser Token
132selfClosingStartTag :: TagName -> [Attr] -> Parser Token
131selfClosingStartTag tag attrs = do
133selfClosingStartTag tag attrs = do
132− (char '>' >> return (TagOpen tag attrs))
134+ (char '>' >> return (TagSelfClose tag attrs))
133 <|> beforeAttrName tag attrs
135 <|> beforeAttrName tag attrs
135-- | /§8.2.4.34/: Before attribute name state
137-- | /§8.2.4.34/: Before attribute name state