Revert "Improve link render hook performance"

This commit is contained in:
Joe Mooring 2025-01-30 01:42:46 -08:00 committed by GitHub
parent fe4c86ec42
commit fa7643d1be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -116,7 +116,7 @@ either of these shortcodes in conjunction with this render hook.
"renderHookName" $renderHookName "renderHookName" $renderHookName
"text" .Text "text" .Text
}} }}
{{- $attrs = partialCached "inline/h-rh-l/get-glossary-link-attributes.html" $ctx }} {{- $attrs = partial "inline/h-rh-l/get-glossary-link-attributes.html" $ctx }}
{{- else if $u.IsAbs }} {{- else if $u.IsAbs }}
{{- /* Destination is a remote resource. */}} {{- /* Destination is a remote resource. */}}
{{- $attrs = merge $attrs (dict "rel" "external") }} {{- $attrs = merge $attrs (dict "rel" "external") }}
@ -136,7 +136,7 @@ either of these shortcodes in conjunction with this render hook.
"parsedURL" $u "parsedURL" $u
"renderHookName" $renderHookName "renderHookName" $renderHookName
}} }}
{{- partialCached "inline/h-rh-l/validate-fragment.html" $ctx }} {{- partial "inline/h-rh-l/validate-fragment.html" $ctx }}
{{- $href = printf "%s#%s" $href . }} {{- $href = printf "%s#%s" $href . }}
{{- end }} {{- end }}
{{- $attrs = dict "href" $href }} {{- $attrs = dict "href" $href }}
@ -169,7 +169,7 @@ either of these shortcodes in conjunction with this render hook.
"parsedURL" $u "parsedURL" $u
"renderHookName" $renderHookName "renderHookName" $renderHookName
}} }}
{{- partialCached "inline/h-rh-l/validate-fragment.html" $ctx }} {{- partial "inline/h-rh-l/validate-fragment.html" $ctx }}
{{- $attrs = dict "href" (printf "%s#%s" $.Page.RelPermalink .) }} {{- $attrs = dict "href" (printf "%s#%s" $.Page.RelPermalink .) }}
{{- else }} {{- else }}
{{- if eq $errorLevel "warning" }} {{- if eq $errorLevel "warning" }}