git.iko.soy/typeable/html-parse
on master help sign in
Eat end of doctype
commitf0e1244a958dac2a4cd07583aea74d798aa199c9 authorBen Gamari <ben@smart-cactus.org> dateWed 6 Apr 2016, 02:37 (11 years ago) parentbeef77a
1 file changed+4−1
Text/HTML/Parser.hs+4−1
Text/HTML/Parser.hs+4−1
@@ -222,7 +222,10 @@ commentEnd content = do
222222-- | 8.2.4.52: DOCTYPE state
223223-- FIXME
224224doctype :: Parser Token
225−doctype = Doctype <$> takeTill (=='>')
225+doctype = do
226+ content <- takeTill (=='>')
227+ char '>'
228+ return $ Doctype content
226229
227230-- | 8.2.4.44: Bogus comment state
228231bogusComment :: Parser Token