diff options
author | 人造电子小猫咪 <batkiz@outlook.com> | 2019-12-15 13:48:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-15 13:48:57 +0300 |
commit | a2c44906ae96403542f37bb8d73d5295ccbfa647 (patch) | |
tree | 517037223ec94225fa3ea064bd808c3e97c34bfe | |
parent | 751b86899b7d77434ae0ec88983f29c42fa8bddd (diff) |
fix the regex for img
-rw-r--r-- | layouts/_default/single.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 322887e..7a74d26 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -38,7 +38,7 @@ {{ end }} <!-- end featured_image--> - {{ $reAltIn := "<img src=\"([^\"]+)\" alt=\"([^\"]+)?\" />" }} + {{ $reAltIn := "<img src=\"([^\"]+)\" alt=\"([^\"]+)?\">" }} {{ $reAltOut := ( printf "<figure><img src=\"/images/ring.svg\" data-sizes=\"auto\" data-src=\"%s$1\" alt=\"$2\" class=\"lazyload\"><figcaption class=\"image-caption\">$2</figcaption></figure>" $cdn_url ) }} {{ $altContent := .Content | replaceRE $reAltIn $reAltOut | safeHTML }} |