diff options
author | jesselau76 <jesselau76@gmail.com> | 2018-11-27 04:42:11 +0300 |
---|---|---|
committer | jesselau76 <jesselau76@gmail.com> | 2018-11-27 04:42:11 +0300 |
commit | c3c4bfffe51fff26de8e0bcf2558455bbbb68c82 (patch) | |
tree | 82713a8330e0fd55b607460b15edee8192e548cb | |
parent | 4a318481522e181d0d5a20b66cf4dd5b2ba1620d (diff) |
regex for images
-rw-r--r-- | layouts/post/single.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/post/single.html b/layouts/post/single.html index a3de4a8..5307ec5 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -49,7 +49,7 @@ {{ if .Site.Params.lazyload }} - {{ $regex := "(?i)src=\"[^\"]*(png|jpg|jpeg|gif|bmp|svg)\"" }} + {{ $regex := "(?i)src=\"([^\"]*(png|jpg|jpeg|gif|bmp|svg))\"" }} {{ $img := findRE $regex .Content }} {{ if gt (len $img) 0 }} |