From aa65aa57b15201b11e945c037f4ea10dd89ca994 Mon Sep 17 00:00:00 2001 From: zPlus Date: Tue, 9 Aug 2022 20:02:31 +0200 Subject: [PATCH] Split commits (subject, body) lines in log page. Split the commit message into "subject" and "body", and show them in a
tag. --- templates/repository/log.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/repository/log.html b/templates/repository/log.html index c2da4bc..b74f5af 100644 --- a/templates/repository/log.html +++ b/templates/repository/log.html @@ -59,12 +59,13 @@ {{ commit.short_id }} - {% if commit.message|length <= 100 %} + {% set subject, body = commit.message.split('\n', 1) %} + {% if body|length == 0 %} {{ commit.message }} {% else %}
- {{ commit.message[:100] }} ... -
{{ commit.message }}
+ {{ subject }} +
{{ body.strip() }}
{% endif %}