summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2016-05-11 18:46:20 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2016-05-11 19:13:43 +0200
commitbe5cccf248bb9e0b3c6ad1db62cff770749f8e52 (patch)
tree0c326010a4a9a74484b5925c68e3a7689a8f2b95 /src
parent76143de97ed64130e982507b43ca380c2bb25ca9 (diff)
Org reader: parse but ignore export options
All known export options are parsed but ignored.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Org.hs37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs
index ffddd0fa6..ceab1e120 100644
--- a/src/Text/Pandoc/Readers/Org.hs
+++ b/src/Text/Pandoc/Readers/Org.hs
@@ -127,11 +127,41 @@ addToNotesTable note = do
exportSetting :: OrgParser ()
exportSetting = choice
[ booleanSetting "^" setExportSubSuperscripts
+ , ignoredSetting "'"
+ , ignoredSetting "*"
+ , ignoredSetting "-"
+ , ignoredSetting ":"
+ , ignoredSetting "<"
+ , ignoredSetting "\\n"
+ , ignoredSetting "arch"
+ , ignoredSetting "author"
+ , ignoredSetting "c"
+ , ignoredSetting "creator"
+ , ignoredSetting "d"
+ , ignoredSetting "date"
+ , ignoredSetting "e"
+ , ignoredSetting "email"
+ , ignoredSetting "f"
+ , ignoredSetting "H"
+ , ignoredSetting "inline"
+ , ignoredSetting "num"
+ , ignoredSetting "p"
+ , ignoredSetting "pri"
+ , ignoredSetting "prop"
+ , ignoredSetting "stat"
+ , ignoredSetting "tags"
+ , ignoredSetting "tasks"
+ , ignoredSetting "tex"
+ , ignoredSetting "timestamp"
+ , ignoredSetting "title"
+ , ignoredSetting "toc"
+ , ignoredSetting "todo"
+ , ignoredSetting "|"
] <?> "export setting"
booleanSetting :: String -> ExportSettingSetter Bool -> OrgParser ()
-booleanSetting str setter = try $ do
- string str
+booleanSetting settingIdentifier setter = try $ do
+ string settingIdentifier
char ':'
value <- many nonspaceChar
let boolValue = case value of
@@ -140,6 +170,9 @@ booleanSetting str setter = try $ do
_ -> True
updateState $ modifyExportSettings setter boolValue
+ignoredSetting :: String -> OrgParser ()
+ignoredSetting s = try (() <$ string s <* char ':' <* many nonspaceChar)
+
--
-- Parser
--