2021-02-21 20:16:11 +00:00
|
|
|
{{- $raw := or (hasPrefix .Text "<img") (hasPrefix .Text "<figure") -}}
|
2022-02-02 21:27:10 +00:00
|
|
|
{{- $code := hasPrefix .Text "<code" -}}
|
2021-12-30 14:55:55 +00:00
|
|
|
<a
|
2022-07-11 14:04:05 +00:00
|
|
|
class="gblog-markdown__link{{- if $raw -}}
|
2022-02-02 21:27:10 +00:00
|
|
|
--raw
|
|
|
|
{{- else if $code -}}
|
|
|
|
--code
|
|
|
|
{{- end }}"
|
2021-12-30 14:55:55 +00:00
|
|
|
href="{{ .Destination | safeURL }}"
|
2022-07-11 14:04:05 +00:00
|
|
|
{{- with .Title }}{{ printf "title=\"%s\"" . | safeHTMLAttr }}{{- end }}
|
2021-12-30 14:55:55 +00:00
|
|
|
>
|
2022-02-02 21:27:10 +00:00
|
|
|
{{- .Text | safeHTML -}}
|
|
|
|
</a>
|
2021-05-23 12:57:55 +00:00
|
|
|
{{- /* Drop trailing newlines */ -}}
|