This commit is contained in:
Tilden Ji 2021-04-27 15:11:41 +08:00
parent 5db78b5364
commit 7b2c1ecb1b
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ hexo.extend.filter.register(
if (!theme.lazyload || !theme.lazyload.enable) return;
data.content = data.content.replace(
// Match 'img' tags width the src attribute.
/<img([^>]*)src="([^"]*)"([^>]*)>/gim,
/<img([^>]*)src="([^"]*)"([^>\/]*)\/?\s*>/gim,
function (match, attrBegin, src, attrEnd) {
// Exit if the src doesn't exists.
if (!src) return match;