From 1fc009248bcb3b86a259c5b840faa7b19b6d58a3 Mon Sep 17 00:00:00 2001 From: Ming Di Leom <2809763-curben@users.noreply.gitlab.com> Date: Sat, 25 Feb 2023 06:41:45 +0000 Subject: [PATCH] refactor: simpler external link check --- scripts/image.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/image.js b/scripts/image.js index 1b97378..eb82a89 100644 --- a/scripts/image.js +++ b/scripts/image.js @@ -18,7 +18,7 @@ hexo.extend.filter.register('marked:renderer', (renderer) => { if (href.endsWith('.svg')) return `${alt}` // embed external image - if (!href.startsWith('20') && !href.startsWith('/20')) return `${alt}` + if (href.startsWith('http')) return `${alt}` const fLink = (path, width) => { const query = new URLSearchParams('f=auto')