diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-11-30 15:34:58 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-11-30 15:34:58 +0100 |
commit | fb8a2540bdb91eee0ecf620b4e9d7acf3d78042f (patch) | |
tree | 448a3c909200e8bbd45ecaa65f2f85d88bcc66c6 /src/Text/Pandoc/Writers/Org.hs | |
parent | ac312caabd8c4e595e0b930154fd3033ba397ace (diff) | |
download | pandoc-fb8a2540bdb91eee0ecf620b4e9d7acf3d78042f.tar.gz |
Options: Removed writerStandalone, made writerTemplate a Maybe.
Previously setting writerStandalone = True did nothing unless
a template was provided in writerTemplate. Now a fragment
will be generated if writerTemplate is Nothing; otherwise,
the specified template will be used and standalone output
generated. [API change]
Diffstat (limited to 'src/Text/Pandoc/Writers/Org.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Org.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs index 18a820f2e..a2f20d830 100644 --- a/src/Text/Pandoc/Writers/Org.hs +++ b/src/Text/Pandoc/Writers/Org.hs @@ -78,9 +78,9 @@ pandocToOrg (Pandoc meta blocks) = do let context = defField "body" main $ defField "math" hasMath $ 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 Org representation of notes. notesToOrg :: [[Block]] -> State WriterState Doc |