git.iko.soy/typeable/pandoc
on master help sign in
Slight code reorganization in endline.
3127ab2John MacFarlane
src/Text/Pandoc/Readers/Markdown.hs+3−5
@@ -1540,16 +1540,14 @@ endline :: MarkdownParser (F Inlines)
1540endline = try $ do
1540endline = try $ do
1541 newline
1541 newline
1542 notFollowedBy blankline
1542 notFollowedBy blankline
1543+ -- parse potential list-starts differently if in a list:
1544+ st <- getState
1545+ when (stateParserContext st == ListItemState) $ notFollowedBy listStart
1543 guardDisabled Ext_lists_without_preceding_blankline <|> notFollowedBy listStart
1546 guardDisabled Ext_lists_without_preceding_blankline <|> notFollowedBy listStart
1544 guardEnabled Ext_blank_before_blockquote <|> notFollowedBy emailBlockQuoteStart
1547 guardEnabled Ext_blank_before_blockquote <|> notFollowedBy emailBlockQuoteStart
1545 guardEnabled Ext_blank_before_header <|> notFollowedBy (char '#') -- atx header
1548 guardEnabled Ext_blank_before_header <|> notFollowedBy (char '#') -- atx header
1546 guardEnabled Ext_backtick_code_blocks >>
1549 guardEnabled Ext_backtick_code_blocks >>
1547 notFollowedBy (() <$ (lookAhead (char '`') >> codeBlockFenced))
1550 notFollowedBy (() <$ (lookAhead (char '`') >> codeBlockFenced))
1548− -- parse potential list-starts differently if in a list:
1549− st <- getState
1550− when (stateParserContext st == ListItemState) $ do
1551− notFollowedBy' bulletListStart
1552− notFollowedBy' anyOrderedListStart
1553 (guardEnabled Ext_hard_line_breaks >> return (return B.linebreak))
1551 (guardEnabled Ext_hard_line_breaks >> return (return B.linebreak))
1554 <|> (guardEnabled Ext_ignore_line_breaks >> return mempty)
1552 <|> (guardEnabled Ext_ignore_line_breaks >> return mempty)
1555 <|> (return $ return B.space)
1553 <|> (return $ return B.space)