From 9dbcf1616158274b0a2c0000b0a6a261080f0006 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Tue, 8 Jan 2019 05:28:47 +0100 Subject: 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. --- src/Text/Pandoc/Readers/Org/Blocks.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.3