@@ -272,13 +272,12 @@ orderedListMarkers (start, numstyle, numdelim) =
272272-- remove empty Str elements.
273273normalizeSpaces :: [Inline] -> [Inline]
274274normalizeSpaces = cleanup . dropWhile isSpaceOrEmpty
275− where cleanup [] = []
276− cleanup (Space:rest) = let rest' = dropWhile isSpaceOrEmpty rest
277− in case rest' of
278− [] -> []
279− _ -> Space : cleanup rest'
275+ where cleanup [] = []
276+ cleanup (Space:rest) = case dropWhile isSpaceOrEmpty rest of
277+ [] -> []
278+ (x:xs) -> Space : x : cleanup xs
280279 cleanup ((Str ""):rest) = cleanup rest
281− cleanup (x:rest) = x : cleanup rest
280+ cleanup (x:rest) = x : cleanup rest
282281
283282isSpaceOrEmpty :: Inline -> Bool
284283isSpaceOrEmpty Space = True