aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs5
-rw-r--r--src/Text/Pandoc/Readers/Org/ExportSettings.hs2
-rw-r--r--src/Text/Pandoc/Readers/Org/ParserState.hs2
3 files changed, 7 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs
index 0e2f49a83..c60817d1b 100644
--- a/src/Text/Pandoc/Readers/Org/Blocks.hs
+++ b/src/Text/Pandoc/Readers/Org/Blocks.hs
@@ -608,7 +608,10 @@ data OrgTable = OrgTable
}
table :: PandocMonad m => OrgParser m (F Blocks)
-table = gridTableWith blocks True <|> orgTable
+table = do
+ withTables <- getExportSetting exportWithTables
+ tbl <- gridTableWith blocks True <|> orgTable
+ return $ if withTables then tbl else mempty
-- | A normal org table
orgTable :: PandocMonad m => OrgParser m (F Blocks)
diff --git a/src/Text/Pandoc/Readers/Org/ExportSettings.hs b/src/Text/Pandoc/Readers/Org/ExportSettings.hs
index 6a628bdd2..9399ebd54 100644
--- a/src/Text/Pandoc/Readers/Org/ExportSettings.hs
+++ b/src/Text/Pandoc/Readers/Org/ExportSettings.hs
@@ -64,7 +64,7 @@ exportSetting = choice
, ignoredSetting "title"
, ignoredSetting "toc"
, booleanSetting "todo" (\val es -> es { exportWithTodoKeywords = val })
- , ignoredSetting "|"
+ , booleanSetting "|" (\val es -> es { exportWithTables = val })
, ignoreAndWarn
] <?> "export setting"
diff --git a/src/Text/Pandoc/Readers/Org/ParserState.hs b/src/Text/Pandoc/Readers/Org/ParserState.hs
index ec316e316..6e2e86373 100644
--- a/src/Text/Pandoc/Readers/Org/ParserState.hs
+++ b/src/Text/Pandoc/Readers/Org/ParserState.hs
@@ -262,6 +262,7 @@ data ExportSettings = ExportSettings
, exportWithLatex :: TeXExport -- ^ Handling of raw TeX commands
, exportWithPlanning :: Bool -- ^ Keep planning info after headlines
, exportWithTags :: Bool -- ^ Keep tags as part of headlines
+ , exportWithTables :: Bool -- ^ Include tables
, exportWithTodoKeywords :: Bool -- ^ Keep TODO keywords in headers
}
@@ -286,5 +287,6 @@ defaultExportSettings = ExportSettings
, exportWithLatex = TeXExport
, exportWithPlanning = False
, exportWithTags = True
+ , exportWithTables = True
, exportWithTodoKeywords = True
}