aboutsummaryrefslogtreecommitdiffstats
path: root/python/fatcat_web
diff options
context:
space:
mode:
Diffstat (limited to 'python/fatcat_web')
-rw-r--r--python/fatcat_web/entity_helpers.py12
-rw-r--r--python/fatcat_web/templates/editgroup_diff.html1
2 files changed, 8 insertions, 5 deletions
diff --git a/python/fatcat_web/entity_helpers.py b/python/fatcat_web/entity_helpers.py
index 9657e828..34a5ceb9 100644
--- a/python/fatcat_web/entity_helpers.py
+++ b/python/fatcat_web/entity_helpers.py
@@ -305,14 +305,16 @@ def _entity_edit_diff(entity_type: str, entity_edit: EntityEdit) -> List[str]:
prev_revision
redirect_ident
"""
- pop_fields = ["revision", "state"]
- new_rev = generic_get_entity_revision(entity_type, entity_edit.revision)
- new_toml = entity_to_toml(new_rev, pop_fields=pop_fields).split("\n")
+ pop_fields = ["ident", "revision", "state"]
+ new_rev = generic_get_entity_revision(entity_type, entity_edit.revision, enrich=False)
+ new_toml = entity_to_toml(new_rev, pop_fields=pop_fields).strip().split("\n")
if len(new_toml) == 1 and not new_toml[0].strip():
new_toml = []
if entity_edit.prev_revision:
- old_rev = generic_get_entity_revision(entity_type, entity_edit.prev_revision)
- old_toml = entity_to_toml(old_rev, pop_fields=pop_fields).split("\n")
+ old_rev = generic_get_entity_revision(
+ entity_type, entity_edit.prev_revision, enrich=False
+ )
+ old_toml = entity_to_toml(old_rev, pop_fields=pop_fields).strip().split("\n")
fromdesc = f"/{entity_type}/rev/{entity_edit.prev_revision}.toml"
else:
old_toml = []
diff --git a/python/fatcat_web/templates/editgroup_diff.html b/python/fatcat_web/templates/editgroup_diff.html
index 4b32fbf5..ec5e4a82 100644
--- a/python/fatcat_web/templates/editgroup_diff.html
+++ b/python/fatcat_web/templates/editgroup_diff.html
@@ -13,6 +13,7 @@
{{ entity_macros.extra_metadata(edit.extra) }}
{% endif %}
{% if edit.revision and not edit.redirect_ident and edit.ident in diffs and diffs[edit.ident] != None %}
+ <br clear="all">
<div style="border: 1px solid black; font-size: smaller; font-color: #222; word-break: break-all; margin-top: 0.5em; margin-bottom: 0.5em;">
{% for line in diffs[edit.ident] %}
{% set line_space = false %}