From d889fd7a0ddb015a7c1d99467d8c1542517e06b2 Mon Sep 17 00:00:00 2001 From: Alasdair Gray Date: Tue, 31 Oct 2023 15:19:20 +0000 Subject: [PATCH 1/2] Usage Notes heading always appears --- src/docs/templates/slot.md.jinja2 | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/docs/templates/slot.md.jinja2 b/src/docs/templates/slot.md.jinja2 index b3515f2..5e1a73f 100644 --- a/src/docs/templates/slot.md.jinja2 +++ b/src/docs/templates/slot.md.jinja2 @@ -27,7 +27,6 @@ The obligation or cardinality can be overridden when used by classes. Check the Mixin: {{ element.mixin }} {% endif -%} -{% if element.comments %} ## Usage Notes {% set comments = element.comments | join('') %} @@ -44,7 +43,6 @@ Mixin: {{ element.mixin }} {{ line }} {% endif %} {% endfor %} -{% endif %} {% if schemaview.slot_parents(element.name) or schemaview.slot_children(element.name, mixins=False) %} From d3e79ea5d9d56b34764735cf873955f849b3b109 Mon Sep 17 00:00:00 2001 From: Alasdair Gray Date: Tue, 31 Oct 2023 15:41:11 +0000 Subject: [PATCH 2/2] Add text prompt --- src/docs/templates/slot.md.jinja2 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/docs/templates/slot.md.jinja2 b/src/docs/templates/slot.md.jinja2 index 5e1a73f..c185715 100644 --- a/src/docs/templates/slot.md.jinja2 +++ b/src/docs/templates/slot.md.jinja2 @@ -28,7 +28,7 @@ Mixin: {{ element.mixin }} {% endif -%} ## Usage Notes - +{% if element.comments %} {% set comments = element.comments | join('') %} {% set comments_lines = comments.split('\n') %} @@ -43,6 +43,9 @@ Mixin: {{ element.mixin }} {{ line }} {% endif %} {% endfor %} +{% else %} +_Usage notes still to be provided._ +{% endif %} {% if schemaview.slot_parents(element.name) or schemaview.slot_children(element.name, mixins=False) %}