From 445b3e00b3c86df44a286c377d033f64ebf7e0fb Mon Sep 17 00:00:00 2001 From: Max Litruv Boonzaayer Date: Mon, 10 Feb 2025 13:47:58 +1100 Subject: [PATCH] Fix regex to include webp format in processWikiLinks method --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index eba156b..dd3f5a6 100644 --- a/index.js +++ b/index.js @@ -429,7 +429,7 @@ class DocumentService { processWikiLinks(content) { return content.replace(/\[\[(.*?)\]\]/g, (match, linkText) => { const [targetTitle, displayText] = linkText.split('|').map(s => s.trim()); - if (targetTitle.match(/\.(png|jpg|jpeg|gif|mp4|webm)$/i)) { + if (targetTitle.match(/\.(png|jpg|jpeg|webp|gif|mp4|webm)$/i)) { return match; }