diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-12-10 16:26:35 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-12-10 16:26:35 -0800 |
commit | de6452c0d1696767c2b08b031e44cbce4df8bc58 (patch) | |
tree | b7e2c7056445f1ff1883f067a9e93782078481ce /src | |
parent | 5770ceca36a7ab15ad43b3d949c749f6425ecbcb (diff) | |
download | pandoc-de6452c0d1696767c2b08b031e44cbce4df8bc58.tar.gz |
Markdown reader: small cosmetic code improvements.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index ad107ecd7..a68741bda 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1091,15 +1091,13 @@ endline = try $ do newline notFollowedBy blankline st <- getState - if stateStrict st - then do notFollowedBy emailBlockQuoteStart - notFollowedBy (char '#') -- atx header - else return () + when (stateStrict st) $ do + notFollowedBy emailBlockQuoteStart + notFollowedBy (char '#') -- atx header -- parse potential list-starts differently if in a list: - if stateParserContext st == ListItemState - then notFollowedBy' (bulletListStart <|> - (anyOrderedListStart >> return ())) - else return () + when (stateParserContext st == ListItemState) $ do + notFollowedBy' bulletListStart + notFollowedBy' anyOrderedListStart return Space -- |