diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-01-07 11:34:27 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-01-07 11:34:27 -0800 |
commit | 9320d359a218a59e28b9a0f0d63e1c2f81ff1214 (patch) | |
tree | 0aa41b27acec9e3fc0469662d2bf31243697cb3c /src | |
parent | d2dfaccb999357b5f90e096bd42bbc087d9d210e (diff) | |
parent | b3b00da43d5727b050b8647dff3b9600c275a1a0 (diff) | |
download | pandoc-9320d359a218a59e28b9a0f0d63e1c2f81ff1214.tar.gz |
Merge pull request #2629 from tarleb/org-noexport-fix
Fix function dropping subtrees tagged :noexport:
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Org.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs index 99a6927e2..c7906618c 100644 --- a/src/Text/Pandoc/Readers/Org.hs +++ b/src/Text/Pandoc/Readers/Org.hs @@ -87,8 +87,10 @@ parseOrg = do -- | Drop COMMENT headers and the document tree below those headers. dropCommentTrees :: [Block] -> [Block] dropCommentTrees [] = [] -dropCommentTrees blks@(b:bs) = - maybe blks (flip dropUntilHeaderAboveLevel bs) $ commentHeaderLevel b +dropCommentTrees (b:bs) = + maybe (b:dropCommentTrees bs) + (dropCommentTrees . flip dropUntilHeaderAboveLevel bs) + (commentHeaderLevel b) -- | Return the level of a header starting a comment or :noexport: tree and -- Nothing otherwise. |