Handle end of input in middle of attribute
commit810b9deba6fdfa192c2d39b8a15edf8966a727e3
authorBen Gamari <ben@smart-cactus.org>
dateMon 15 May 2017, 11:34 (9 years ago)
parentad978f3
Text/HTML/Parser.hs+1
@@ -166,6 +166,7 @@ afterAttrName tag attrs name = do
166166 id $ (char '/' >> selfClosingStartTag tag attrs)
167167 <|> (char '=' >> beforeAttrValue tag attrs name)
168168 <|> (char '>' >> return (TagOpen tag (Attr name T.empty : attrs)))
169+ <|> (endOfInput >> return (ContentText ""))
169170 <|> attrName tag (Attr name T.empty : attrs) -- not exactly sure this is right
170171
171172-- | /§8.2.4.35/: Before attribute value state