aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Shared.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Shared.hs')
-rw-r--r--src/Text/Pandoc/Shared.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs
index 9ee80827f..745e809d0 100644
--- a/src/Text/Pandoc/Shared.hs
+++ b/src/Text/Pandoc/Shared.hs
@@ -284,8 +284,8 @@ escapeURI = escapeURIString (not . needsEscaping)
tabFilter :: Int -- ^ Tab stop
-> T.Text -- ^ Input
-> T.Text
-tabFilter tabStop =
- T.unlines . (if tabStop == 0 then id else map go) . T.lines
+tabFilter tabStop = T.filter (/= '\r') . T.unlines .
+ (if tabStop == 0 then id else map go) . T.lines
where go s =
let (s1, s2) = T.break (== '\t') s
in if T.null s2