From 30faa6478edbc1e54498b7cbb20111d75a96d2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sun, 23 May 2021 11:19:37 +0200 Subject: [PATCH] Fix duplicate top line in NEWS.rst It looks like towncrier unconditionally writes top_line when it is defined in the title_format configuration. So we must not repeat it in the template. When running towncrier with --draft, it works differently so in that case the top line is not shown... --- tools/news/template.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/news/template.rst b/tools/news/template.rst index cff0db4f6..91003f202 100644 --- a/tools/news/template.rst +++ b/tools/news/template.rst @@ -1,6 +1,6 @@ {% set underline = "=" %} -{{ top_line }} -{{ underline * top_line|length }} + +{{ underline * ((top_line)|length) }} {% for section in sections %} {% set underline = "-" %} {% if section %}