diff --git a/tools/clean_asm.py b/tools/clean_asm.py index e7bdccd..9ade8b6 100644 --- a/tools/clean_asm.py +++ b/tools/clean_asm.py @@ -7,7 +7,7 @@ def main() -> None: args = parser.parse_args() regex = r"(\:\n)(.*?)(^[^\n]+\n[^\n]+result_.*?\n\n)" - subst = "\\g<1>\\g<2>\\g<3>" + subst = "\\g<1>\\g<2>\\g<3>" with open(args.path, 'rt') as f: text = f.read() @@ -20,7 +20,7 @@ def main() -> None: text = re.sub(regex, subst, text, 0, re.MULTILINE | re.DOTALL) - text = re.sub(r" +", " ", text, 0, re.MULTILINE | re.DOTALL) + text = re.sub(r"(?<= ) ", " ", text, 0, re.MULTILINE | re.DOTALL) print('') for line in text.splitlines():