aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-12-21 16:45:13 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2010-12-21 16:45:13 -0800
commitce533ffd90059f1475ee0e6c5dfd326814cdebbd (patch)
tree25f3733b83d4fd98affb811ef3b45d0ebea2119b /src
parentfe1152985ca8824b62c7bce397a681e7e422e8e1 (diff)
downloadpandoc-ce533ffd90059f1475ee0e6c5dfd326814cdebbd.tar.gz
Pretty: don't print a breaking space before a newline.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Pretty.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Pretty.hs b/src/Text/Pandoc/Pretty.hs
index 90dbf7684..c6ba6fb01 100644
--- a/src/Text/Pandoc/Pretty.hs
+++ b/src/Text/Pandoc/Pretty.hs
@@ -250,6 +250,10 @@ renderList (NewLine : xs) = do
outp (-1) "\n"
renderList xs
+renderList (BreakingSpace : CarriageReturn : xs) = renderList (CarriageReturn:xs)
+renderList (BreakingSpace : NewLine : xs) = renderList (NewLine:xs)
+renderList (BreakingSpace : BlankLine : xs) = renderList (BlankLine:xs)
+renderList (BreakingSpace : BreakingSpace : xs) = renderList (BreakingSpace:xs)
renderList (BreakingSpace : xs) = do
let isText (Text _ _) = True
isText (Block _ _) = True