Made the link shortcode more readable.

This commit is contained in:
wermos 2024-06-03 20:39:10 +05:30
parent 46737b193f
commit c6cffadfa1
No known key found for this signature in database
GPG key ID: 8CBC132DB3E00784

View file

@ -1 +1,7 @@
<a href="{{ .Destination | safeURL }}" {{ with .Title}} title="{{ . }}"{{ end }}{{ if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end }}>{{ .Text | safeHTML }}</a>
<a href="{{ .Destination | safeURL }}"
{{- with .Title -}}
title="{{ . }}"
{{- end }}
{{- if or (strings.HasPrefix .Destination "http:") (strings.HasPrefix .Destination "https:") }} target="_blank"{{ end -}}>
{{- .Text | safeHTML -}}
</a>