fix: a tag rel attire space

This commit is contained in:
Dillon 2022-06-19 23:06:34 +08:00
parent d02d3216da
commit 96c582fac1
No known key found for this signature in database
GPG key ID: 0EF4AE57FB98F108

View file

@ -1,5 +1,5 @@
{{- $rel := "" -}} {{- $rel := "" -}}
<a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if (urls.Parse .Destination).Host | or .Newtab }}{{ $rel = "noopener noreffer" }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .Rel }} {{ . }}{{ end }}"{{ with .Class }} class="{{ . }}"{{ end }}> <a href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}{{ if (urls.Parse .Destination).Host | or .Newtab }}{{ $rel = "noopener noreffer " }} target="_blank"{{ end }} rel="{{ $rel }}{{ with .Rel }}{{ . }}{{ end }}"{{ with .Class }} class="{{ . }}"{{ end }}>
{{- with .Icon -}} {{- with .Icon -}}
{{- partial "plugin/icon.html" . -}} {{- partial "plugin/icon.html" . -}}
{{- end -}} {{- end -}}