From 92d6ca069863a9ee801895ab0196eb510f7cffc4 Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 6 Nov 2017 23:41:00 +0100 Subject: [PATCH] fix space bug in headlineManager --- src/fenrir/core/headLineManager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/fenrir/core/headLineManager.py b/src/fenrir/core/headLineManager.py index f6295e68..7df9e31c 100644 --- a/src/fenrir/core/headLineManager.py +++ b/src/fenrir/core/headLineManager.py @@ -29,7 +29,9 @@ class headLineManager(): else: newText += ' ' + str(int(numberOfChars / 2)) + ' ' + name + ' ' lastPos = span[1] - newText += ' ' + text[lastPos:] + if lastPos != 0: + newText += ' ' + newText += text[lastPos:] lastPos = 0 for match in self.regExSingle.finditer(newText): span = match.span() @@ -41,5 +43,7 @@ class headLineManager(): else: result += ' ' + str(int(numberOfChars / 2)) + ' ' + name + ' ' lastPos = span[1] - result += ' ' + newText[lastPos:] + if lastPos != 0: + result += ' ' + result += newText[lastPos:] return result