From 5c643d535bf015d533716d4b34a767d3b7ae65af Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Mon, 19 Nov 2018 04:07:02 +0300 Subject: FB2 reader: do not throw error for unknown elements in Some libraries include custom elements in their FB2 files. --- src/Text/Pandoc/Readers/FB2.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/FB2.hs b/src/Text/Pandoc/Readers/FB2.hs index 577fc85b6..c609eceea 100644 --- a/src/Text/Pandoc/Readers/FB2.hs +++ b/src/Text/Pandoc/Readers/FB2.hs @@ -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 @\@ element. parseBinaryElement :: PandocMonad m => Element -> FB2 m () -- cgit v1.2.3