diff --git a/publish.js b/publish.js index a0f3331..a067a86 100644 --- a/publish.js +++ b/publish.js @@ -29,7 +29,7 @@ function updateCurrentPath() { publish.registerMarkdownPostProcessor(async (el, ctx) => { updateCurrentPath(); - const blockImages = Array.from(el.querySelectorAll('.internal-embed')); + const blockImages = Array.from(el.querySelectorAll('.internal-embed')).filter(span => /\.(jpg|jpeg|png|gif|bmp|svg)$/i.test(span.getAttribute('src'))); blockImages.forEach((span) => { if (!span.classList.contains('processed')) { span.classList.add('processed');