summaryrefslogtreecommitdiffstats
path: root/docs/templates/python/material/docstring/examples.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/templates/python/material/docstring/examples.html')
-rw-r--r--docs/templates/python/material/docstring/examples.html14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/templates/python/material/docstring/examples.html b/docs/templates/python/material/docstring/examples.html
new file mode 100644
index 0000000..d8709c9
--- /dev/null
+++ b/docs/templates/python/material/docstring/examples.html
@@ -0,0 +1,14 @@
+{{ log.debug("Rendering examples section") }}
+
+{% import "language.html" as lang with context %}
+
+<details class="example" open>
+ <summary>{{ "Examples" | convert_markdown(heading_level +1, html_id, strip_paragraph=True) }}</summary>
+ {% for section_type, sub_section in section.value %}
+ {% if section_type.value == "text" %}
+ {{ sub_section|convert_markdown(heading_level, html_id) }}
+ {% elif section_type.value == "examples" %}
+ {{ sub_section|highlight(language="pycon", linenums=False) }}
+ {% endif %}
+ {% endfor %}
+</details>