Skip to content

Commit 337b46b

Browse files
committed
fix: Use toc_label option in a few missing places
Issue-267: #267
1 parent ecc5fe1 commit 337b46b

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/mkdocstrings_handlers/python/templates/material/_base/attribute.html.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Context:
3939
role="data" if attribute.parent.kind.value == "module" else "attr",
4040
id=html_id,
4141
class="doc doc-heading",
42-
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + attribute.name,
42+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-attribute"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else attribute_name),
4343
) %}
4444

4545
{% block heading scoped %}

src/mkdocstrings_handlers/python/templates/material/_base/class.html.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Context:
3838
role="class",
3939
id=html_id,
4040
class="doc doc-heading",
41-
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + class.name,
41+
toc_label=('<code class="doc-symbol doc-symbol-toc doc-symbol-class"></code>&nbsp;'|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else class.name),
4242
) %}
4343

4444
{% block heading scoped %}

src/mkdocstrings_handlers/python/templates/material/_base/function.html.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Context:
4545
role="function",
4646
id=html_id,
4747
class="doc doc-heading",
48-
toc_label=(('<code class="doc-symbol doc-symbol-toc doc-symbol-' + symbol_type + '"></code>&nbsp;')|safe if config.show_symbol_type_toc else '') + function.name,
48+
toc_label=(('<code class="doc-symbol doc-symbol-toc doc-symbol-' + symbol_type + '"></code>&nbsp;')|safe if config.show_symbol_type_toc else '') + (config.toc_label if config.toc_label and root else function.name),
4949
) %}
5050

5151
{% block heading scoped %}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy