diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-12-21 16:45:13 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-12-21 16:45:13 -0800 |
commit | ce533ffd90059f1475ee0e6c5dfd326814cdebbd (patch) | |
tree | 25f3733b83d4fd98affb811ef3b45d0ebea2119b /src/Text | |
parent | fe1152985ca8824b62c7bce397a681e7e422e8e1 (diff) | |
download | pandoc-ce533ffd90059f1475ee0e6c5dfd326814cdebbd.tar.gz |
Pretty: don't print a breaking space before a newline.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Pretty.hs | 4 |
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 |