@@ -355,8 +355,8 @@ orderedListMarkers (start, numstyle, numdelim) =
355355 in map inDelim nums
356356
357357-- | Normalize a list of inline elements: remove leading and trailing
358−-- @Space@ elements, collapse double @Space@s into singles, and
359−-- remove empty Str elements.
358+-- @Space@, @LineBreak@, and @SoftBreak@ elements, collapse double
359+-- @Space@s into singles, and remove empty @Str@ elements.
360360normalizeSpaces :: [Inline] -> [Inline]
361361normalizeSpaces = cleanup . dropWhile isSpaceOrEmpty
362362 where cleanup [] = []
@@ -368,6 +368,8 @@ normalizeSpaces = cleanup . dropWhile isSpaceOrEmpty
368368
369369isSpaceOrEmpty :: Inline -> Bool
370370isSpaceOrEmpty Space = True
371+isSpaceOrEmpty SoftBreak = True
372+isSpaceOrEmpty LineBreak = True
371373isSpaceOrEmpty (Str "") = True
372374isSpaceOrEmpty _ = False
373375