diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-06-29 22:14:01 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-06-29 22:14:01 -0700 |
commit | a1f010de7830777b86f88743785560a04fab62fd (patch) | |
tree | 1ab1d0cb2045ec51e890c9e1a636b888334a7391 /src/Text/Pandoc/Writers/Man.hs | |
parent | 5cb0f0bbf1da61b7ce276a39055a51b6166500cc (diff) |
Metadata changes: Variables now completely shadow metadata.
Previously if you set a value both in metadata and with a variable,
they'd be combined into a list. Now the variable replaces the
value in document metadata. If many variables with the same
name are set, a list is created.
Shared: metaToJSON now has an argument for a variable list.
Diffstat (limited to 'src/Text/Pandoc/Writers/Man.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Man.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs index 7162ffa17..7c326a9c9 100644 --- a/src/Text/Pandoc/Writers/Man.hs +++ b/src/Text/Pandoc/Writers/Man.hs @@ -74,6 +74,7 @@ pandocToMan opts (Pandoc meta blocks) = do metadata <- metaToJSON (fmap (render colwidth) . blockListToMan opts) (fmap (render colwidth) . inlineListToMan opts) + (writerVariables opts) $ deleteMeta "title" meta body <- blockListToMan opts blocks notes <- liftM stNotes get @@ -83,8 +84,7 @@ pandocToMan opts (Pandoc meta blocks) = do let context = defField "body" main $ setFieldsFromTitle $ defField "has-tables" hasTables - $ foldl (\acc (x,y) -> setField x y acc) - metadata (writerVariables opts) + $ metadata if writerStandalone opts then return $ renderTemplate' (writerTemplate opts) context else return main |