diff options
Diffstat (limited to 'src/Text/Pandoc/Writers/ZimWiki.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/ZimWiki.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/ZimWiki.hs b/src/Text/Pandoc/Writers/ZimWiki.hs index 8afbfef92..423928c8a 100644 --- a/src/Text/Pandoc/Writers/ZimWiki.hs +++ b/src/Text/Pandoc/Writers/ZimWiki.hs @@ -32,7 +32,7 @@ http://zim-wiki.org/manual/Help/Wiki_Syntax.html module Text.Pandoc.Writers.ZimWiki ( writeZimWiki ) where import Text.Pandoc.Definition -import Text.Pandoc.Options ( WriterOptions(writerTableOfContents, writerStandalone, writerTemplate, writerWrapText), WrapOption(..) ) +import Text.Pandoc.Options ( WriterOptions(writerTableOfContents, writerTemplate, writerWrapText), WrapOption(..) ) import Text.Pandoc.Shared ( escapeURI, linesToPara, removeFormatting, trimr , substitute ) import Text.Pandoc.Writers.Shared ( defField, metaToJSON ) @@ -71,9 +71,9 @@ pandocToZimWiki opts (Pandoc meta blocks) = do let context = defField "body" main $ defField "toc" (writerTableOfContents opts) $ metadata - if writerStandalone opts - then return $ renderTemplate' (writerTemplate opts) context - else return main + case writerTemplate opts of + Just tpl -> return $ renderTemplate' tpl context + Nothing -> return main -- | Escape special characters for ZimWiki. escapeString :: String -> String |