diff --git a/src/mkdocstrings_handlers/python/templates/material/_base/expression.html b/src/mkdocstrings_handlers/python/templates/material/_base/expression.html index 52d3a624..6ba78963 100644 --- a/src/mkdocstrings_handlers/python/templates/material/_base/expression.html +++ b/src/mkdocstrings_handlers/python/templates/material/_base/expression.html @@ -8,9 +8,13 @@ {%- set annotation = full -%} {%- endif -%} {%- for title, path in annotation|split_path(full) -%} - {%- filter stash_crossref(length=title|length) -%} - {{ title }} - {%- endfilter -%} + {%- if not signature or config.signature_crossrefs -%} + {%- filter stash_crossref(length=title|length) -%} + {{ title }} + {%- endfilter -%} + {%- else -%} + {{ title }} + {%- endif -%} {%- if not loop.last -%}.{%- endif -%} {%- endfor -%} {%- endwith -%}