FB2 reader: do not throw error for unknown elements in <body>

Some libraries include custom elements in their FB2 files.
This commit is contained in:
Alexander Krotov 2018-11-19 04:07:02 +03:00
parent 1b15913b6e
commit 5c643d535b

View file

@ -157,7 +157,7 @@ parseBodyChild e =
"title" -> header <$> gets fb2SectionLevel <*> parseTitleType (elContent e)
"epigraph" -> parseEpigraph e
"section" -> parseSection e
name -> throwError $ PandocParseError ("Couldn't parse FB2 file: unexpected element " ++ name ++ " in body.")
name -> report (UnexpectedXmlElement name "body") $> mempty
-- | Parse a @\<binary>@ element.
parseBinaryElement :: PandocMonad m => Element -> FB2 m ()