From b430290d21568588d4777b3284c070b97b991b29 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Tue, 5 May 2020 01:33:13 +0200 Subject: [PATCH] Allow broken lines --- markdownrunner.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/markdownrunner.py b/markdownrunner.py index 7566808..9eeb50e 100755 --- a/markdownrunner.py +++ b/markdownrunner.py @@ -60,10 +60,15 @@ def parse_snippet(s: Tuple[str, str]) -> Sequence[Command]: # The original context should be mentioned for all hunks context = s[0] + + snippet = s[1] + # Fix line-breaks + # FIXME: nonsystematic and ad hoc + snippet = snippet.replace('\\\n', '') # We now check the separate lines and possibly tweak them (e.g. by removing sudo-s) - lines = s[1].split('\n') + lines = snippet.split('\n') global directory result = [] for line in lines: