git.iko.soy/typeable/pandoc
on master help sign in
Shared: Minor refactoring.
commit221177c272cbe21513b3f012959a10530ece720d authorJohn MacFarlane <jgm@berkeley.edu> dateFri 4 Feb 2011, 18:32 (16 years ago) parent714303b
1 file changed+4−1
src/Text/Pandoc/Shared.hs+4−1
src/Text/Pandoc/Shared.hs+4−1
@@ -287,7 +287,10 @@ removeEmptyInlines (x : xs) = x : removeEmptyInlines xs
287287removeEmptyInlines [] = []
288288
289289removeTrailingInlineSpaces :: [Inline] -> [Inline]
290−removeTrailingInlineSpaces = reverse . dropWhile isSpaceOrEmpty . reverse
290+removeTrailingInlineSpaces = reverse . removeLeadingInlineSpaces . reverse
291+
292+removeLeadingInlineSpaces :: [Inline] -> [Inline]
293+removeLeadingInlineSpaces = dropWhile isSpaceOrEmpty
291294
292295consolidateInlines :: [Inline] -> [Inline]
293296consolidateInlines (Str x : ys) =