FB2 reader: do not throw error for unknown elements in <body>
Some libraries include custom elements in their FB2 files.
commit5c643d535bf015d533716d4b34a767d3b7ae65af
authorAlexander Krotov <ilabdsf@gmail.com>
dateMon 19 Nov 2018, 04:07 (8 years ago)
parent1b15913
src/Text/Pandoc/Readers/FB2.hs+1−1
@@ -157,7 +157,7 @@ parseBodyChild e =
157157 "title" -> header <$> gets fb2SectionLevel <*> parseTitleType (elContent e)
158158 "epigraph" -> parseEpigraph e
159159 "section" -> parseSection e
160− name -> throwError $ PandocParseError ("Couldn't parse FB2 file: unexpected element " ++ name ++ " in body.")
160+ name -> report (UnexpectedXmlElement name "body") $> mempty
161161
162162-- | Parse a @\<binary>@ element.
163163parseBinaryElement :: PandocMonad m => Element -> FB2 m ()