From e1460abe6b247c8e14b7b6137551f689508e522e Mon Sep 17 00:00:00 2001 From: "Alexios Zavras (zvr)" Date: Mon, 22 Jun 2026 11:14:55 +0200 Subject: [PATCH] Always show Properties section in a class Signed-off-by: Alexios Zavras (zvr) --- spec_parser/templates/mkdocs/class.md.j2 | 5 +++-- spec_parser/templates/singlefile/class.md.j2 | 5 +++-- spec_parser/templates/tex/class.tex.j2 | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/spec_parser/templates/mkdocs/class.md.j2 b/spec_parser/templates/mkdocs/class.md.j2 index 78af7f3..8d1d4ae 100644 --- a/spec_parser/templates/mkdocs/class.md.j2 +++ b/spec_parser/templates/mkdocs/class.md.j2 @@ -34,15 +34,16 @@ {% block extra %} -{% if properties %} ## Properties +{% if properties %} | Property | Type | minCount | maxCount | |---|---|:---:|:---:| {% for name, kv in properties | dictsort %} | {{property_link(name)}} | {{type_link(kv["type"])}} | {{kv["minCount"]}} | {{kv["maxCount"]}} | {% endfor %} - +{% else %} +No properties defined in this class. {% endif %} {% if ext_prop_restrs %} diff --git a/spec_parser/templates/singlefile/class.md.j2 b/spec_parser/templates/singlefile/class.md.j2 index c584ef0..d28e1a2 100644 --- a/spec_parser/templates/singlefile/class.md.j2 +++ b/spec_parser/templates/singlefile/class.md.j2 @@ -23,15 +23,16 @@ {% block extra %} -{% if properties %} #### Properties +{% if properties %} | Property | Type | minCount | maxCount | |---|---|:---:|:---:| {% for name, kv in properties | dictsort %} | {{name}} | {{kv["type"]}} | {{kv["minCount"]}} | {{kv["maxCount"]}} | {% endfor %} - +{% else %} +No properties defined in this class. {% endif %} {% if ext_prop_restrs %} diff --git a/spec_parser/templates/tex/class.tex.j2 b/spec_parser/templates/tex/class.tex.j2 index 97568f9..263dfd0 100644 --- a/spec_parser/templates/tex/class.tex.j2 +++ b/spec_parser/templates/tex/class.tex.j2 @@ -23,8 +23,8 @@ {% endblock %} {% block extra %} -{% if properties %} \spdxpagepart{Properties} +{% if properties %} \begin{tabular}{ l l c c } \toprule Property & Type & minCount & maxCount \\ @@ -35,6 +35,8 @@ \bottomrule \end{tabular} \par +{% else %} +No properties defined in this class. {% endif %} {% if ext_prop_restrs %}