diff --git a/src/dmdoc/template/dm_module.html b/src/dmdoc/template/dm_module.html
index ba2197be..f831df00 100644
--- a/src/dmdoc/template/dm_module.html
+++ b/src/dmdoc/template/dm_module.html
@@ -22,7 +22,7 @@
| {% if item.type.substance -%}
{{item.type.path}}
{%- else -%}
- {{ item.type.path | safe | linkify_type }}
+ {{ item.type.path | linkify_type | safe }}
{%- endif %} | {{ item.type.teaser | safe }} |
{%- endif %}
{%- endfor -%}
diff --git a/src/dmdoc/template/dm_type.html b/src/dmdoc/template/dm_type.html
index a24933b6..7fe817b4 100644
--- a/src/dmdoc/template/dm_type.html
+++ b/src/dmdoc/template/dm_type.html
@@ -11,11 +11,11 @@
{% if path == "(global)" -%}
(global)
{%- elif details.name -%}
- {{ details.name }}
+ {{ details.name }}
{%- else -%}
- {{ path | safe | linkify_type }}
+ {{ path | linkify_type | safe }}
{%- endif %}
-{%- if details.parent_type %}{% endif -%}
+{%- if details.parent_type %}{% endif -%}
{{ macros::git_link(env=env, item=details) }}
{% if details.docs %}{{ details.docs.html | safe }}{% endif %}
@@ -50,7 +50,7 @@
+ {{ var.type.path | linkify_type | safe }}
{%- endif -%}
{{ macros::git_link(env=env, item=var) }}
{{ var.docs.html | safe }}
@@ -67,7 +67,7 @@
{{ name }}