aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorBrian Leung <bkleung89@gmail.com>2019-01-08 05:28:47 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2019-01-07 20:28:47 -0800
commit9dbcf1616158274b0a2c0000b0a6a261080f0006 (patch)
treeb14a45324ddd8c7e059994e7e777a45700904fb8 /src/Text/Pandoc
parentf9d9880325454e51948518d54e36cc6a6e91bde2 (diff)
downloadpandoc-9dbcf1616158274b0a2c0000b0a6a261080f0006.tar.gz
Org reader: handle `minlevel` option differently. (#5190)
When `minlevel` exceeds the original minimum level observed in the file to be included, every heading should be shifted rightward.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs
index 1c52c3477..d3702687c 100644
--- a/src/Text/Pandoc/Readers/Org/Blocks.hs
+++ b/src/Text/Pandoc/Readers/Org/Blocks.hs
@@ -547,9 +547,7 @@ include = try $ do
shiftHeader :: Int -> Block -> Block
shiftHeader shift blk =
- if shift <= 0
- then blk
- else case blk of
+ case blk of
(Header lvl attr content) -> Header (lvl - shift) attr content
_ -> blk