Skip to content

Commit a24ae2e

Browse files
committed
fix: Fix docstring admonitions rendering
1 parent 83cf39a commit a24ae2e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/mkdocstrings_handlers/python/templates/material/_base/docstring.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
{% elif section.kind.value == "examples" %}
2323
{% include "docstring/examples.html" with context %}
2424
{% elif section.kind.value == "admonition" %}
25-
<details class="{{ section.value.kind }}">
26-
{{ section.title|convert_markdown(heading_level, html_id) }}
27-
{{ section.value.contents|convert_markdown(heading_level, html_id) }}
28-
</details>
25+
{% include "docstring/admonition.html" with context %}
2926
{% endif %}
3027
{% endfor %}
3128
{% endif %}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% extends "_base/docstring/admonition.html" %}

0 commit comments

Comments
 (0)