We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
The text was updated successfully, but these errors were encountered:
fix: Remove duplicated headings for docstrings nested in tabs/admonit…
24b91c2
…ions mkdocstrings#609
fix: Dedup headings in tabs/admonitions mkdocstrings#609
9defd30
e2123a9
…ions Issue #609: #609 PR #610: #610
No branches or pull requests
Describe the bug
Nesting a docstring in another block (e.g., tab or admonition) produces duplicated headings.
tests/fixtures/headings.py
index.md
In 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.
The text was updated successfully, but these errors were encountered: