From c406fc9def3f79e44127316c56b43c680abf3c68 Mon Sep 17 00:00:00 2001 From: Alasdair Gray Date: Tue, 17 Oct 2023 12:28:52 +0100 Subject: [PATCH] Fix #46 heading only displays if there is content --- src/docs/templates/slot.md.jinja2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/docs/templates/slot.md.jinja2 b/src/docs/templates/slot.md.jinja2 index bde2209..c7a0985 100644 --- a/src/docs/templates/slot.md.jinja2 +++ b/src/docs/templates/slot.md.jinja2 @@ -45,6 +45,7 @@ Regex pattern: {{ '`' }}{{ element.pattern }}{{ '`' }} Mixin: {{ element.mixin }} {% endif -%} +{% if element.comments %} ## Usage Notes {% set comments = element.comments | join('') %} @@ -61,6 +62,7 @@ Mixin: {{ element.mixin }} {{ line }} {% endif %} {% endfor %} +{% endif %} {% if schemaview.slot_parents(element.name) or schemaview.slot_children(element.name, mixins=False) %}