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)
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