From 8a5541dca88190e6fdf6ed9ff5c1c5c69c3c9710 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Wed, 1 Nov 2017 13:08:15 +0300 Subject: FB2 writer: remove from is not allowed inside according to FictionBook2 XML schema. Besides that, the same information is already placed inside . Related bug: #2424 --- src/Text/Pandoc/Writers/FB2.hs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/FB2.hs b/src/Text/Pandoc/Writers/FB2.hs index 666b67e52..8986c1191 100644 --- a/src/Text/Pandoc/Writers/FB2.hs +++ b/src/Text/Pandoc/Writers/FB2.hs @@ -94,9 +94,9 @@ pandocToFB2 :: PandocMonad m pandocToFB2 opts (Pandoc meta blocks) = do modify (\s -> s { writerOptions = opts }) desc <- description meta - fp <- frontpage meta + title <- cMapM toXml . docTitle $ meta secs <- renderSections 1 blocks - let body = el "body" $ fp ++ secs + let body = el "body" $ el "title" (el "p" title) : secs notes <- renderFootnotes (imgs,missing) <- fmap imagesToFetch get >>= \s -> lift (fetchImages s) let body' = replaceImagesWithAlt missing body @@ -110,15 +110,6 @@ pandocToFB2 opts (Pandoc meta blocks) = do in [ uattr "xmlns" xmlns , attr ("xmlns", "l") xlink ] -frontpage :: PandocMonad m => Meta -> FBM m [Content] -frontpage meta' = do - t <- cMapM toXml . docTitle $ meta' - return - [ el "title" (el "p" t) - , el "annotation" (map (el "p" . cMap plain) - (docAuthors meta' ++ [docDate meta'])) - ] - description :: PandocMonad m => Meta -> FBM m Content description meta' = do bt <- booktitle meta' -- cgit v1.2.3