Skip to content

Commit

Permalink
Markdown reader: Prevent spurious line breaks after list items.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jgm committed Jun 20, 2014
1 parent 2eadc78 commit 56c410e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Text/Pandoc/Readers/Markdown.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 56c410e

Please sign in to comment.