diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-01-07 20:33:45 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-01-07 20:39:40 -0800 |
commit | 710a22e5ac5c9e94cf98bd2a496359fe1573fb97 (patch) | |
tree | e543f3f6bd56fcc278e0946f0b82f8a7c87c23ea /src/Text/Pandoc | |
parent | 9dbcf1616158274b0a2c0000b0a6a261080f0006 (diff) | |
download | pandoc-710a22e5ac5c9e94cf98bd2a496359fe1573fb97.tar.gz |
Org reader: allow for case of :minlevel == 0.
See #5190.
Diffstat (limited to 'src/Text/Pandoc')
-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 |