refactor: simpler external link check

This commit is contained in:
Ming Di Leom 2023-02-25 06:41:45 +00:00
parent 658261f619
commit 1fc009248b
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ hexo.extend.filter.register('marked:renderer', (renderer) => {
if (href.endsWith('.svg')) return `<img class="svg" src="${href}" alt="${alt}" title="${title}">`
// embed external image
if (!href.startsWith('20') && !href.startsWith('/20')) return `<img src="${href}" alt="${alt}" title="${title}">`
if (href.startsWith('http')) return `<img src="${href}" alt="${alt}" title="${title}">`
const fLink = (path, width) => {
const query = new URLSearchParams('f=auto')