From de6452c0d1696767c2b08b031e44cbce4df8bc58 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Fri, 10 Dec 2010 16:26:35 -0800
Subject: [PATCH] Markdown reader: small cosmetic code improvements.

---
 src/Text/Pandoc/Readers/Markdown.hs | 14 ++++++--------
 1 file 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
 
 --