From 7d1cea9ca5cfbe4a995b5c638cf1cc61c3d9432f Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sun, 15 Mar 2020 10:49:21 +0100 Subject: text: Fix newlines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace Windows-style newlines with Unix newlines. There were quite a few stray \r’s in the stats. This takes care of them. --- lulua/text.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lulua/text.py b/lulua/text.py index 1d46af8..f988c2a 100644 --- a/lulua/text.py +++ b/lulua/text.py @@ -261,8 +261,9 @@ def writeWorker (layout, sourceFunc, inq, outq): # extract (can be multiple items per source) for text in sourceFunc (item): - # map chars - text = mapChars (text, charMap) + # map chars; make sure we’re using unix line endings, which is + # only one character + text = mapChars (text, charMap).replace ('\r\n', '\n') # init a new writer for every item w = Writer (layout) -- cgit v1.2.3