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: