@@ -7,8 +7,8 @@
77--
88module Text.HTML.Parser
99 ( -- * Parsing
10− token
11− , tagStream
10+ parseTokens
11+ , token
1212 -- * Types
1313 , Token(..)
1414 , TagName, AttrName, AttrValue
@@ -41,13 +41,14 @@ type AttrValue = Text
4141
4242-- | An HTML token
4343data Token
44− -- | An opening tag. Attribute ordering is arbitrary
44+ -- | An opening tag. Attribute ordering is arbitrary.
4545 = TagOpen !TagName [Attr]
4646 -- | A closing tag.
4747 | TagClose !TagName
4848 -- | The content between tags.
49− | ContentChar !Char
5049 | ContentText !Text
50+ -- | A single character of content
51+ | ContentChar !Char
5152 -- | Contents of a comment.
5253 | Comment !Builder
5354 -- | Doctype
@@ -245,9 +246,9 @@ doctype = do
245246bogusComment :: Parser Token
246247bogusComment = fail "Bogus comment"
247248
248−-- | Produce a lazy list of tokens.
249−tagStream :: Text -> [Token]
250−tagStream = unfoldr f
249+-- | Parse a lazy list of tokens.
250+parseTokens :: Text -> [Token]
251+parseTokens = unfoldr f
251252 where
252253 f :: Text -> Maybe (Token, Text)
253254 f t