aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Org/ExportSettings.hs4
-rw-r--r--src/Text/Pandoc/Readers/Org/Meta.hs7
-rw-r--r--src/Text/Pandoc/Readers/Org/ParserState.hs2
3 files changed, 8 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Org/ExportSettings.hs b/src/Text/Pandoc/Readers/Org/ExportSettings.hs
index 6233a6104..283cfa998 100644
--- a/src/Text/Pandoc/Readers/Org/ExportSettings.hs
+++ b/src/Text/Pandoc/Readers/Org/ExportSettings.hs
@@ -56,7 +56,9 @@ exportSetting = choice
, archivedTreeSetting "arch" (\val es -> es { exportArchivedTrees = val })
, booleanSetting "author" (\val es -> es { exportWithAuthor = val })
, ignoredSetting "c"
- , ignoredSetting "creator"
+ -- org-mode allows the special value `comment` for creator, which we'll
+ -- interpret as true as it doesn't make sense in the context of Pandoc.
+ , booleanSetting "creator" (\val es -> es { exportWithCreator = val })
, complementableListSetting "d" (\val es -> es { exportDrawers = val })
, ignoredSetting "date"
, ignoredSetting "e"
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
diff --git a/src/Text/Pandoc/Readers/Org/ParserState.hs b/src/Text/Pandoc/Readers/Org/ParserState.hs
index 4c3aa298c..84dbe9d33 100644
--- a/src/Text/Pandoc/Readers/Org/ParserState.hs
+++ b/src/Text/Pandoc/Readers/Org/ParserState.hs
@@ -164,6 +164,7 @@ data ExportSettings = ExportSettings
, exportSpecialStrings :: Bool -- ^ Parse ellipses and dashes smartly
, exportSubSuperscripts :: Bool -- ^ TeX-like syntax for sub- and superscripts
, exportWithAuthor :: Bool -- ^ Include author in final meta-data
+ , exportWithCreator :: Bool -- ^ Include creator in final meta-data
, exportWithEmail :: Bool -- ^ Include email in final meta-data
}
@@ -180,6 +181,7 @@ defaultExportSettings = ExportSettings
, exportSpecialStrings = True
, exportSubSuperscripts = True
, exportWithAuthor = True
+ , exportWithCreator = True
, exportWithEmail = True
}