mirror of https://gitlab.com/curben/blog
refactor: simpler external link check
This commit is contained in:
parent
658261f619
commit
1fc009248b
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue