From 76a12a1b9f8ac848680bb9ff3b459a717aa04c58 Mon Sep 17 00:00:00 2001 From: jaseg Date: Mon, 12 Jul 2021 14:25:35 +0200 Subject: Prettify diff --- paper/Makefile | 1 + paper/diffinator.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/paper/Makefile b/paper/Makefile index eb94566..285d184 100644 --- a/paper/Makefile +++ b/paper/Makefile @@ -38,6 +38,7 @@ resources/%.pdf: $(LAB_PATH)/%.ipynb clean: rm -f ${main_tex}.aux ${main_tex}.bbl ${main_tex}.bcf ${main_tex}.log ${main_tex}.blg rm -f ${main_tex}.out ${main_tex}.run.xml texput.log + rm -f ${main_tex}_diff.* rm -f ${brief_tex}.aux ${brief_tex}.bbl ${brief_tex}.bcf ${brief_tex}.log ${brief_tex}.blg rm -f ${brief_tex}.out ${brief_tex}.run.xml texput.log diff --git a/paper/diffinator.py b/paper/diffinator.py index 2972d47..ad3b2fb 100644 --- a/paper/diffinator.py +++ b/paper/diffinator.py @@ -57,8 +57,8 @@ def generate_git_tex_diff(texfile, bibliography, revision): line = line.rstrip() if document_started: # diff results in preamble - line = addition_re.sub(r'\\color{diffgreen}\1\\color{black}', line) - line = deletion_re.sub(r'\\color{diffred}\1\\color{black}', line) + line = addition_re.sub(r'\\color{diffgreen}\1 \\color{black}', line) + line = deletion_re.sub(r'\\color{diffred}\1 \\color{black}', line) else: if '\\begin{document}' in line: -- cgit