summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTzu-ping Chung <uranusjr@gmail.com>2021-04-15 07:21:24 +0800
committerTzu-ping Chung <uranusjr@gmail.com>2021-04-15 07:21:24 +0800
commita79c6267de60410de4aa37fa65637d4a4d0ff45e (patch)
tree467566ffaf7cf65795b189ade5dbbc0533f8fd61 /tools
parentdf84d1ce6297818cb069378a15eab4946b06b880 (diff)
downloadpip-a79c6267de60410de4aa37fa65637d4a4d0ff45e.tar.gz
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.
Diffstat (limited to 'tools')
-rw-r--r--tools/news/template.rst6
1 files 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 %}