aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Org/ExportSettings.hs2
-rw-r--r--src/Text/Pandoc/Readers/Org/Inlines.hs5
-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/ExportSettings.hs b/src/Text/Pandoc/Readers/Org/ExportSettings.hs
index 206c8ba92..6a628bdd2 100644
--- a/src/Text/Pandoc/Readers/Org/ExportSettings.hs
+++ b/src/Text/Pandoc/Readers/Org/ExportSettings.hs
@@ -49,7 +49,7 @@ exportSetting = choice
, ignoredSetting "date"
, booleanSetting "e" (\val es -> es { exportWithEntities = val })
, booleanSetting "email" (\val es -> es { exportWithEmail = val })
- , ignoredSetting "f"
+ , booleanSetting "f" (\val es -> es { exportWithFootnotes = val })
, integerSetting "H" (\val es -> es { exportHeadlineLevels = val })
, ignoredSetting "inline"
, ignoredSetting "num"
diff --git a/src/Text/Pandoc/Readers/Org/Inlines.hs b/src/Text/Pandoc/Readers/Org/Inlines.hs
index 13b1315b8..b234bee58 100644
--- a/src/Text/Pandoc/Readers/Org/Inlines.hs
+++ b/src/Text/Pandoc/Readers/Org/Inlines.hs
@@ -378,7 +378,10 @@ citation = try $ do
else rest
footnote :: PandocMonad m => OrgParser m (F Inlines)
-footnote = try $ inlineNote <|> referencedNote
+footnote = try $ do
+ note <- inlineNote <|> referencedNote
+ withNote <- getExportSetting exportWithFootnotes
+ return $ if withNote then note else mempty
inlineNote :: PandocMonad m => OrgParser m (F Inlines)
inlineNote = try $ do
diff --git a/src/Text/Pandoc/Readers/Org/ParserState.hs b/src/Text/Pandoc/Readers/Org/ParserState.hs
index ac826b6f9..ec316e316 100644
--- a/src/Text/Pandoc/Readers/Org/ParserState.hs
+++ b/src/Text/Pandoc/Readers/Org/ParserState.hs
@@ -258,6 +258,7 @@ data ExportSettings = ExportSettings
, exportWithCreator :: Bool -- ^ Include creator in final meta-data
, exportWithEmail :: Bool -- ^ Include email in final meta-data
, exportWithEntities :: Bool -- ^ Include MathML-like entities
+ , exportWithFootnotes :: Bool -- ^ Include footnotes
, exportWithLatex :: TeXExport -- ^ Handling of raw TeX commands
, exportWithPlanning :: Bool -- ^ Keep planning info after headlines
, exportWithTags :: Bool -- ^ Keep tags as part of headlines
@@ -281,6 +282,7 @@ defaultExportSettings = ExportSettings
, exportWithCreator = True
, exportWithEmail = True
, exportWithEntities = True
+ , exportWithFootnotes = True
, exportWithLatex = TeXExport
, exportWithPlanning = False
, exportWithTags = True