fix: prevend wrong formatting for linked images
This commit is contained in:
parent
3f79ebfbf7
commit
0d80589019
3 changed files with 18 additions and 3 deletions
|
@ -1 +1,2 @@
|
|||
<a href="{{ .Destination | safeURL | relURL }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
|
||||
{{ $raw := or (hasPrefix .Text "<img") (hasPrefix .Text "<figure") }}
|
||||
<a class="gdoc-markdown__link{{ if $raw }}--raw{{ end }}" href="{{ .Destination | safeURL | relURL }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<div class="flex justify-center">
|
||||
<figure class="gdoc-markdown__figure">
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<a class="gdoc-markdown__link--raw" href="{{ .RelPermalink }}">
|
||||
<img
|
||||
{{ if $lazyLoad }}loading="lazy"{{ end }}
|
||||
{{ with $customSize }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue