mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 23:38:56 +00:00
🐛 Fix: don't display external icon when links has icon suffix (#96)
This commit is contained in:
@@ -31,7 +31,11 @@
|
||||
{{- with .Content -}}
|
||||
{{- . | safeHTML -}}
|
||||
{{- end -}}
|
||||
{{- if (.ExternalIcon | default false) | and $external | and (eq (hasPrefix .Content `<img` ) false) }}
|
||||
{{- if
|
||||
(.ExternalIcon | default false)
|
||||
| and $external | and (eq (hasPrefix .Content `<img` ) false)
|
||||
| and (eq ((strings.HasSuffix .Content `</i>`) | or (strings.HasSuffix .Content `):`)) false)
|
||||
}}
|
||||
{{ if .Download }}
|
||||
{{ dict "Class" "fas fa-cloud-download-alt fa-fw fa-xs" | partial "plugin/icon.html" }}
|
||||
{{- else -}}
|
||||
|
||||
Reference in New Issue
Block a user