From a24ae2e95f4c0451a44037120451cf06c973ba65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Tue, 1 Feb 2022 21:51:08 +0100 Subject: [PATCH 1/2] fix: Fix docstring admonitions rendering --- .../python/templates/material/_base/docstring.html | 5 +---- .../python/templates/material/docstring/admonition.html | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) create mode 100644 src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html b/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html index 410e210b..f8071bd7 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/docstring.html @@ -22,10 +22,7 @@ {% elif section.kind.value == "examples" %} {% include "docstring/examples.html" with context %} {% elif section.kind.value == "admonition" %} -
- {{ section.title|convert_markdown(heading_level, html_id) }} - {{ section.value.contents|convert_markdown(heading_level, html_id) }} -
+ {% include "docstring/admonition.html" with context %} {% endif %} {% endfor %} {% endif %} diff --git a/src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html b/src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html new file mode 100644 index 00000000..da2e9546 --- /dev/null +++ b/src/mkdocstrings_handlers/python/templates/material/docstring/admonition.html @@ -0,0 +1 @@ +{% extends "_base/docstring/admonition.html" %} From 8fc8ea5b112627958968823ef500cfa46b63613e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Tue, 1 Feb 2022 21:51:35 +0100 Subject: [PATCH 2/2] chore: Prepare release 0.4.1 --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58af7589..8a4c486e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.4.1](https://github.com/mkdocstrings/python/releases/tag/0.4.1) - 2022-02-01 + +[Compare with 0.4.0](https://github.com/mkdocstrings/python/compare/0.4.0...0.4.1) + +### Bug Fixes +- Fix docstring admonitions rendering ([a24ae2e](https://github.com/mkdocstrings/python/commit/a24ae2e95f4c0451a44037120451cf06c973ba65) by Timothée Mazzucotelli). + + ## [0.4.0](https://github.com/mkdocstrings/python/releases/tag/0.4.0) - 2022-02-01 [Compare with 0.3.0](https://github.com/mkdocstrings/python/compare/0.3.0...0.4.0)