|
|
|
@ -61,9 +61,14 @@ 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:
|
|
|
|
|