aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-11-19 04:07:02 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-11-19 04:07:02 +0300
commit5c643d535bf015d533716d4b34a767d3b7ae65af (patch)
treecf86c74f51dd14af8d65bcbd51e34910b02eda0c /src
parent1b15913b6e42bdfd5c65d1e50a26e3fc807ef937 (diff)
downloadpandoc-5c643d535bf015d533716d4b34a767d3b7ae65af.tar.gz
FB2 reader: do not throw error for unknown elements in <body>
Some libraries include custom elements in their FB2 files.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/FB2.hs2
1 files changed, 1 insertions, 1 deletions
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 @\<binary>@ element.
parseBinaryElement :: PandocMonad m => Element -> FB2 m ()