diff options
Diffstat (limited to 'src/Text/Pandoc/Readers/Org/Blocks.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Org/Blocks.hs | 4 |
1 files changed, 3 insertions, 1 deletions
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 |