mirror of
https://github.com/thegeeklab/hugo-geekdoc.git
synced 2024-11-16 09:50:40 +00:00
15 lines
371 B
HTML
15 lines
371 B
HTML
{{- $raw := or (hasPrefix .Text "<img") (hasPrefix .Text "<figure") -}}
|
|
{{- $code := hasPrefix .Text "<code" -}}
|
|
<a
|
|
class="gdoc-markdown__link{{ if $raw -}}
|
|
--raw
|
|
{{- else if $code -}}
|
|
--code
|
|
{{- end }}"
|
|
href="{{ .Destination | safeURL }}"
|
|
{{ with .Title }}title="{{ . }}"{{ end }}
|
|
>
|
|
{{- .Text | safeHTML -}}
|
|
</a>
|
|
{{- /* Drop trailing newlines */ -}}
|