Fix links rendering extra whitespace

This commit is contained in:
Joshua Goins 2022-10-05 10:58:25 -04:00
parent 9e1464974e
commit 4a481c6cc0

View file

@ -1,6 +1,4 @@
{{ $icon := resources.Get "external-link.svg" }}
<a href="{{ .Destination | safeURL }}" {{ if strings.HasPrefix .Destination "http" }}
target="_blank"{{ end }}>{{ .PlainText }}
{{ if strings.HasPrefix .Destination "http" }}<object data="{{ $icon.Permalink }}" type="image/svg+xml"></object>
{{ end -}}</a>
target="_blank"{{ end }}>{{ .PlainText }}{{ if strings.HasPrefix .Destination "http" }}<object data="{{ $icon.Permalink }}" type="image/svg+xml"></object>{{ end -}}</a>