aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Haddock.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers/Haddock.hs')
-rw-r--r--src/Text/Pandoc/Writers/Haddock.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Haddock.hs b/src/Text/Pandoc/Writers/Haddock.hs
index caf549916..29fdafe15 100644
--- a/src/Text/Pandoc/Writers/Haddock.hs
+++ b/src/Text/Pandoc/Writers/Haddock.hs
@@ -73,9 +73,9 @@ pandocToHaddock opts (Pandoc meta blocks) = do
meta
let context = defField "body" main
$ metadata
- if writerStandalone opts
- then return $ renderTemplate' (writerTemplate opts) context
- else return main
+ case writerTemplate opts of
+ Nothing -> return main
+ Just tpl -> return $ renderTemplate' tpl context
-- | Return haddock representation of notes.
notesToHaddock :: WriterOptions -> [[Block]] -> State WriterState Doc