git.iko.soy/typeable/pandoc
on master help sign in
Slight code reorganization in endline.
commit3127ab2b5ede10224f9f86722125573d34d7d3dd authorJohn MacFarlane <fiddlosopher@gmail.com> dateTue 4 Feb 2014, 10:05 (13 years ago) parent4a84e96
1 file changed+3−5
src/Text/Pandoc/Readers/Markdown.hs+3−5
src/Text/Pandoc/Readers/Markdown.hs+3−5
@@ -1540,16 +1540,14 @@ endline :: MarkdownParser (F Inlines)
15401540endline = try $ do
15411541 newline
15421542 notFollowedBy blankline
1543+ -- parse potential list-starts differently if in a list:
1544+ st <- getState
1545+ when (stateParserContext st == ListItemState) $ notFollowedBy listStart
15431546 guardDisabled Ext_lists_without_preceding_blankline <|> notFollowedBy listStart
15441547 guardEnabled Ext_blank_before_blockquote <|> notFollowedBy emailBlockQuoteStart
15451548 guardEnabled Ext_blank_before_header <|> notFollowedBy (char '#') -- atx header
15461549 guardEnabled Ext_backtick_code_blocks >>
15471550 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
15531551 (guardEnabled Ext_hard_line_breaks >> return (return B.linebreak))
15541552 <|> (guardEnabled Ext_ignore_line_breaks >> return mempty)
15551553 <|> (return $ return B.space)