From 63bdc5d08f81365db15b1d9ae11c1d6af72ae35e Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sun, 30 Oct 2016 13:20:25 +0100 Subject: Org reader: support the `todo` export option The `todo` export option allows to toggle the inclusion of TODO keywords in the output. Setting this to `nil` causes TODO keywords to be dropped from headlines. The default is to include the keywords. --- src/Text/Pandoc/Readers/Org/Blocks.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Readers/Org/Blocks.hs') diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs index ead600ccc..a5957dbc9 100644 --- a/src/Text/Pandoc/Readers/Org/Blocks.hs +++ b/src/Text/Pandoc/Readers/Org/Blocks.hs @@ -196,9 +196,12 @@ headlineToHeaderWithContents hdln@(Headline {..}) = do headlineToHeader :: Headline -> OrgParser Blocks headlineToHeader (Headline {..}) = do - let todoText = case headlineTodoMarker of + exportTodoKeyword <- getExportSetting exportWithTodoKeywords + let todoText = if exportTodoKeyword + then case headlineTodoMarker of Just kw -> todoKeywordToInlines kw <> B.space Nothing -> mempty + else mempty let text = tagTitle (todoText <> headlineText) headlineTags let propAttr = propertiesToAttr headlineProperties attr <- registerHeader propAttr headlineText -- cgit v1.2.3