From 88313c0b93694e310175a461ed74f497debbd57d Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Mon, 29 Aug 2016 14:10:58 +0200 Subject: Org reader: respect `creator` export option The `creator` option controls whether the creator meta-field should be included in the final markup. Setting `#+OPTIONS: creator:nil` will drop the creator field from the final meta-data output. Org-mode recognizes the special value `comment` for this field, causing the creator to be included in a comment. This is difficult to translate to Pandoc internals and is hence interpreted the same as other truish values (i.e. the meta field is kept if it's present). --- src/Text/Pandoc/Readers/Org/Meta.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/Text/Pandoc/Readers/Org/Meta.hs') diff --git a/src/Text/Pandoc/Readers/Org/Meta.hs b/src/Text/Pandoc/Readers/Org/Meta.hs index a20c25e09..11eb18e36 100644 --- a/src/Text/Pandoc/Readers/Org/Meta.hs +++ b/src/Text/Pandoc/Readers/Org/Meta.hs @@ -54,10 +54,9 @@ metaExport :: OrgParser (F Meta) metaExport = do st <- getState let settings = orgStateExportSettings st - let withAuthor = exportWithAuthor settings - let withEmail = exportWithEmail settings - return $ (if withAuthor then id else removeMeta "author") - . (if withEmail then id else removeMeta "email") + return $ (if exportWithAuthor settings then id else removeMeta "author") + . (if exportWithCreator settings then id else removeMeta "creator") + . (if exportWithEmail settings then id else removeMeta "email") <$> orgStateMeta st removeMeta :: String -> Meta -> Meta -- cgit v1.2.3