From 7eb0b05827f633a6ccb3b90c09899f05c95851a1 Mon Sep 17 00:00:00 2001 From: Lukas Rothenberger Date: Wed, 21 Aug 2024 16:04:17 +0200 Subject: [PATCH] fix: minor --- discopop_library/LineMapping/diff_modifications.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/discopop_library/LineMapping/diff_modifications.py b/discopop_library/LineMapping/diff_modifications.py index 3d9cf6583..8d8ae1b32 100644 --- a/discopop_library/LineMapping/diff_modifications.py +++ b/discopop_library/LineMapping/diff_modifications.py @@ -50,7 +50,13 @@ def apply_line_mapping_modifications_from_diff(file_id: int, diff: str) -> None: # get cleaned diff cleaned_diff: List[str] = [] for line in diff.split("\n"): - if line.startswith("<") or line.startswith(">") or line.startswith("-") or len(line) == 0: + if ( + line.startswith("<") + or line.startswith(">") + or line.startswith("-") + or line.startswith("\\") + or len(line) == 0 + ): continue line = line.replace("\n", "") cleaned_diff.append(line)