Describe the bug
Nesting a docstring in another block (e.g., tab or admonition) produces duplicated headings.
tests/fixtures/headings.py
"""
Foo
===
### Bar
###### Baz
"""
index.md
Top.[^aaa]
=== "Tab A"
::: tests.fixtures.headings
In this case, the "Foo" header will appear twice in the produced html, both at the right position and after the inserted docstring :
<p>Top.[^aaa]</p>
<div class="tabbed-set tabbed-alternate" data-tabs="1:1"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><div class="tabbed-labels"><label for="__tabbed_1_1">Tab A</label></div>
<div class="tabbed-content">
<div class="tabbed-block">
<div class="mkdocstrings">
<div class="doc doc-object doc-module">
<a id="tests.fixtures.headings"></a>
<div class="doc doc-contents first">
<h2 id="tests.fixtures.headings--foo">Foo</h2>
<h4 id="tests.fixtures.headings--bar">Bar</h4>
<h6 id="tests.fixtures.headings--baz">Baz</h6>
</div>
</div><h2 data-role="module" id="tests.fixtures.headings"></h2>
<h2 id="tests.fixtures.headings--foo">Foo</h2>
<h4 id="tests.fixtures.headings--bar">Bar</h4>
<h6 id="tests.fixtures.headings--baz">Baz</h6>
</div>
</div>
</div>
</div>
Expected behavior
Headings from docstrings should not be duplicated.
Describe the bug
Nesting a docstring in another block (e.g., tab or admonition) produces duplicated headings.
tests/fixtures/headings.pyindex.mdIn this case, the "Foo" header will appear twice in the produced html, both at the right position and after the inserted docstring :
Expected behavior
Headings from docstrings should not be duplicated.