From 710a22e5ac5c9e94cf98bd2a496359fe1573fb97 Mon Sep 17 00:00:00 2001 From: John MacFarlane <jgm@berkeley.edu> Date: Mon, 7 Jan 2019 20:33:45 -0800 Subject: [PATCH] Org reader: allow for case of :minlevel == 0. See #5190. --- src/Text/Pandoc/Readers/Org/Blocks.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs index d3702687c..9e3fe3d79 100644 --- a/src/Text/Pandoc/Readers/Org/Blocks.hs +++ b/src/Text/Pandoc/Readers/Org/Blocks.hs @@ -548,7 +548,9 @@ include = try $ do shiftHeader :: Int -> Block -> Block shiftHeader shift blk = case blk of - (Header lvl attr content) -> Header (lvl - shift) attr content + (Header lvl attr content) + | lvl - shift > 0 -> Header (lvl - shift) attr content + | otherwise -> Para content _ -> blk rawExportLine :: PandocMonad m => OrgParser m Blocks