From 4c7a88bf00b6d64d1192fbca09a40cc01c9ef946 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Tue, 5 May 2020 04:02:39 +0200 Subject: [PATCH] Get rid of trailing newline when running scripts --- markdownrunner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/markdownrunner.py b/markdownrunner.py index 88ab338..916a99f 100755 --- a/markdownrunner.py +++ b/markdownrunner.py @@ -152,6 +152,7 @@ def user_action(hunk: Sequence[Command], context=None) -> Sequence[Command]: for line in tmpfile.file.readlines(): if line == '': continue + line = line.rstrip('\n') parts = line.split('\t', maxsplit=2) # Change user to None if it is not specified parts[0] = parts[0].strip() if parts[0].strip() != '' else None