Skip to content

Commit

Permalink
fix: Don't render cross-ref spans when they're not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Sep 5, 2023
1 parent a6ed28c commit eed51ee
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@
{%- set annotation = full -%}
{%- endif -%}
{%- for title, path in annotation|split_path(full) -%}
{%- filter stash_crossref(length=title|length) -%}
<span data-autorefs-optional{% if title != path %}-hover{% endif %}="{{ path }}">{{ title }}</span>
{%- endfilter -%}
{%- if not signature or config.signature_crossrefs -%}
{%- filter stash_crossref(length=title|length) -%}
<span data-autorefs-optional{% if title != path %}-hover{% endif %}="{{ path }}">{{ title }}</span>
{%- endfilter -%}
{%- else -%}
{{ title }}
{%- endif -%}
{%- if not loop.last -%}.{%- endif -%}
{%- endfor -%}
{%- endwith -%}
Expand Down

0 comments on commit eed51ee

Please sign in to comment.