From a79c6267de60410de4aa37fa65637d4a4d0ff45e Mon Sep 17 00:00:00 2001 From: Tzu-ping Chung Date: Thu, 15 Apr 2021 07:21:24 +0800 Subject: [PATCH] Render top_line explicitly in towncrier template This allows sphinxcontrib-towncrier to render it in the documentation. The rendering of NEWS.rst is unchanged since Towncrier detects automatically if that line exists and does not render a duplicated section title. --- tools/news/template.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/news/template.rst b/tools/news/template.rst index 7ea90573d..70d6ab75d 100644 --- a/tools/news/template.rst +++ b/tools/news/template.rst @@ -1,7 +1,9 @@ -{% for section in sections %} +{{ top_line -}} + +{%- for section in sections %} {% set underline = "-" %} {% if section %} -{{section}} +{{ section }} {{ underline * section|length }}{% set underline = "~" %} {% endif %} -- GitLab