forked from TrueCloudLab/distribution
e2ae76f1f2
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
14 lines
402 B
HTML
14 lines
402 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 }}{{ printf "title=\"%s\"" . | safeHTMLAttr }}{{- end }}
|
|
>
|
|
{{- .Text | safeHTML -}}
|
|
</a>
|
|
{{- /* Drop trailing newlines */ -}}
|