diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-06-20 11:10:35 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-06-20 11:10:35 -0700 |
commit | 56c410ef6a3b7c3dd4054b18ea667cb4ab5a5ee0 (patch) | |
tree | 8d9c24598c44166e40ef78f56125b53c614f6a27 | |
parent | 2eadc7805392c165f7286bd9a337b310b41c897d (diff) | |
download | pandoc-56c410ef6a3b7c3dd4054b18ea667cb4ab5a5ee0.tar.gz |
Markdown reader: Prevent spurious line breaks after list items.
When the `hard_line_breaks` option was specified, pandoc would
produce a spurious line break after a tight list item. This
patch solves the problem. Closes #1137.
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index a6720beba..2c9064994 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1560,7 +1560,8 @@ endline = try $ do guardEnabled Ext_blank_before_header <|> notFollowedBy (char '#') -- atx header guardDisabled Ext_backtick_code_blocks <|> notFollowedBy (() <$ (lookAhead (char '`') >> codeBlockFenced)) - (guardEnabled Ext_hard_line_breaks >> return (return B.linebreak)) + (eof >> return mempty) + <|> (guardEnabled Ext_hard_line_breaks >> return (return B.linebreak)) <|> (guardEnabled Ext_ignore_line_breaks >> return mempty) <|> (return $ return B.space) |