diff options
-rw-r--r-- | src/Text/Pandoc/Readers/FB2.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/FB2.hs b/src/Text/Pandoc/Readers/FB2.hs index cc10913e2..484d5ceb8 100644 --- a/src/Text/Pandoc/Readers/FB2.hs +++ b/src/Text/Pandoc/Readers/FB2.hs @@ -62,7 +62,9 @@ instance HasMeta FB2State where readFB2 :: PandocMonad m => ReaderOptions -> Text -> m Pandoc readFB2 _ inp = do - (bs, st) <- runStateT (mapM parseBlock $ parseXML (crFilter inp)) def + let parsedXml = parseXML $ crFilter inp + + (bs, st) <- runStateT (mapM parseBlock $ parsedXml) def let authors = if null $ fb2Authors st then id else setMeta "author" (map text $ reverse $ fb2Authors st) |