fix: prevend wrong formatting for linked images
parent
3f79ebfbf7
commit
0d80589019
|
@ -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 }}
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
font-weight: bolder;
|
||||
}
|
||||
|
||||
a {
|
||||
a,
|
||||
&__link {
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid transparent;
|
||||
line-height: 1em;
|
||||
|
@ -52,6 +53,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
&__link--raw {
|
||||
text-decoration: none;
|
||||
color: $body-font-color;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&:visited {
|
||||
color: $body-font-color;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
border-radius: $border-radius;
|
||||
|
|
Loading…
Reference in New Issue