git.iko.soy/typeable/pandoc
on master help sign in
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.

commit56c410ef6a3b7c3dd4054b18ea667cb4ab5a5ee0 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 20 Jun 2014, 11:10 (12 years ago) parent2eadc78
1 file changed+2−1
src/Text/Pandoc/Readers/Markdown.hs+2−1
src/Text/Pandoc/Readers/Markdown.hs+2−1
@@ -1560,7 +1560,8 @@ endline = try $ do
15601560 guardEnabled Ext_blank_before_header <|> notFollowedBy (char '#') -- atx header
15611561 guardDisabled Ext_backtick_code_blocks <|>
15621562 notFollowedBy (() <$ (lookAhead (char '`') >> codeBlockFenced))
1563− (guardEnabled Ext_hard_line_breaks >> return (return B.linebreak))
1563+ (eof >> return mempty)
1564+ <|> (guardEnabled Ext_hard_line_breaks >> return (return B.linebreak))
15641565 <|> (guardEnabled Ext_ignore_line_breaks >> return mempty)
15651566 <|> (return $ return B.space)
15661567