aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-02-04 18:32:54 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-02-04 18:32:54 -0800
commit221177c272cbe21513b3f012959a10530ece720d (patch)
tree027c0b1bd055def426ca44d033a7b4168b09ad0e /src
parent714303b210b249292b83eb13ed37dd897999380d (diff)
downloadpandoc-221177c272cbe21513b3f012959a10530ece720d.tar.gz
Shared: Minor refactoring.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Shared.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 37873f822..8326c89ae 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -287,7 +287,10 @@ removeEmptyInlines (x : xs) = x : removeEmptyInlines xs
removeEmptyInlines [] = []
removeTrailingInlineSpaces :: [Inline] -> [Inline]
-removeTrailingInlineSpaces = reverse . dropWhile isSpaceOrEmpty . reverse
+removeTrailingInlineSpaces = reverse . removeLeadingInlineSpaces . reverse
+
+removeLeadingInlineSpaces :: [Inline] -> [Inline]
+removeLeadingInlineSpaces = dropWhile isSpaceOrEmpty
consolidateInlines :: [Inline] -> [Inline]
consolidateInlines (Str x : ys) =