File tree 1 file changed +8
-7
lines changed
src/mkdocstrings_handlers/python/templates/material/_base
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,16 @@ which is a tree-like structure representing a Python expression.
32
32
{% - set annotation = full -%}
33
33
{% - endif -%}
34
34
{% - for title , path in annotation |split_path (full ) -%}
35
- {% - if config . signature_crossrefs -%}
36
- {% - if signature - % }
37
- {% - filter stash_crossref ( length = title |length ) - %}
38
- < autoref identifier = " {{ path }} " optional{% if title ! = path %} hover{% endif %} >{{ title }}</ autoref >
39
- {% - endfilter - % }
40
- {% - else -%}
35
+ {% - if not signature -%}
36
+ {#- Always render cross-references outside of signatures. We don't need to stash them. -# }
37
+ < autoref identifier = " {{ path }} " optional{% if title ! = path %} hover{% endif %} >{{ title }}</ autoref >
38
+ {% - elif config . signature_crossrefs - %}
39
+ {#- We're in a signature and cross-references are enabled, we must render one and stash it. -# }
40
+ {% - filter stash_crossref ( length = title |length ) -%}
41
41
<autoref identifier =" {{ path }}" optional{% if title ! = path %} hover{% endif %} >{{ title }}</autoref >
42
- {% - endif -%}
42
+ {% - endfilter -%}
43
43
{% - else -%}
44
+ {#- We're in a signature but cross-references are disabled, we just render the title. -#}
44
45
{{ title }}
45
46
{% - endif -%}
46
47
{% - if not loop .last -%} .{% - endif -%}
You can’t perform that action at this time.
0 commit comments