git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: small cosmetic code improvements.
commitde6452c0d1696767c2b08b031e44cbce4df8bc58 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 10 Dec 2010, 16:26 (16 years ago) parent5770cec
1 file changed+6−8
src/Text/Pandoc/Readers/Markdown.hs+6−8
src/Text/Pandoc/Readers/Markdown.hs+6−8
@@ -1091,15 +1091,13 @@ endline = try $ do
10911091 newline
10921092 notFollowedBy blankline
10931093 st <- getState
1094− if stateStrict st
1095− then do notFollowedBy emailBlockQuoteStart
1096− notFollowedBy (char '#') -- atx header
1097− else return ()
1094+ when (stateStrict st) $ do
1095+ notFollowedBy emailBlockQuoteStart
1096+ notFollowedBy (char '#') -- atx header
10981097 -- parse potential list-starts differently if in a list:
1099− if stateParserContext st == ListItemState
1100− then notFollowedBy' (bulletListStart <|>
1101− (anyOrderedListStart >> return ()))
1102− else return ()
1098+ when (stateParserContext st == ListItemState) $ do
1099+ notFollowedBy' bulletListStart
1100+ notFollowedBy' anyOrderedListStart
11031101 return Space
11041102
11051103--