git.iko.soy/typeable/html-parse
on master help sign in
Eat end of doctype
f0e1244Ben Gamari
Text/HTML/Parser.hs+4−1
@@ -222,7 +222,10 @@ commentEnd content = do
222-- | 8.2.4.52: DOCTYPE state
222-- | 8.2.4.52: DOCTYPE state
223-- FIXME
223-- FIXME
224doctype :: Parser Token
224doctype :: Parser Token
225−doctype = Doctype <$> takeTill (=='>')
225+doctype = do
226+ content <- takeTill (=='>')
227+ char '>'
228+ return $ Doctype content
226
229
227-- | 8.2.4.44: Bogus comment state
230-- | 8.2.4.44: Bogus comment state
228bogusComment :: Parser Token
231bogusComment :: Parser Token