8000 fix: Don't render cross-ref spans when they're not enabled · romain-intel/mkdocstrings-python@eed51ee · GitHub
[go: up one dir, main page]

Skip to content

Commit eed51ee

Browse files
committed
fix: Don't render cross-ref spans when they're not enabled
1 parent a6ed28c commit eed51ee

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,13 @@
88
{%- set annotation = full -%}
99
{%- endif -%}
1010
{%- for title, path in annotation|split_path(full) -%}
11-
{%- filter stash_crossref(length=title|length) -%}
12-
<span data-autorefs-optional{% if title != path %}-hover{% endif %}="{{ path }}">{{ title }}</span>
13-
{%- endfilter -%}
11+
{%- if not signature or config.signature_crossrefs -%}
12+
{%- filter stash_crossref(length=title|length) -%}
13+
<span data-autorefs-optional{% if title != path %}-hover{% endif %}="{{ path }}">{{ title }}</span>
14+
{%- endfilter -%}
15+
{%- else -%}
16+
{{ title }}
17+
{%- endif -%}
1418
{%- if not loop.last -%}.{%- endif -%}
1519
{%- endfor -%}
1620
{%- endwith -%}

0 commit comments

Comments
 (0)
0