From ed02358a90763b161b0ece0321bb9676f333383a Mon Sep 17 00:00:00 2001 From: Trim21 Date: Sat, 17 Aug 2024 08:16:53 +0800 Subject: [PATCH] fix: name diff --- server/__init__.py | 2 +- server/templates/diff.html | 36 ------------------------------ server/templates/patch.html.jinja2 | 2 +- 3 files changed, 2 insertions(+), 38 deletions(-) delete mode 100644 server/templates/diff.html diff --git a/server/__init__.py b/server/__init__.py index 0404105..b380697 100644 --- a/server/__init__.py +++ b/server/__init__.py @@ -62,7 +62,7 @@ async def get_patch(patch_id: str, request: Request) -> Template: logger.error("broken patch {!r}", patch_id) raise InternalServerException name_patch = "".join( - difflib.unified_diff([patch.original_name], [patch.name], "name", "name") + difflib.unified_diff([patch.original_name + "\n"], [patch.name + "\n"], "name", "name") ) infobox_patch = "" diff --git a/server/templates/diff.html b/server/templates/diff.html deleted file mode 100644 index 7db3ee1..0000000 --- a/server/templates/diff.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - -
- - diff --git a/server/templates/patch.html.jinja2 b/server/templates/patch.html.jinja2 index fc1e61a..e7f0088 100644 --- a/server/templates/patch.html.jinja2 +++ b/server/templates/patch.html.jinja2 @@ -108,7 +108,7 @@ fileListStartVisible: false, fileContentToggle: false, maxLineSizeInBlockForComparison: 80, - matching: 'words', + matching: 'lines', outputFormat: 'line-by-line', synchronisedScroll: true, renderNothingWhenEmpty: false,