mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
Fix regex to include webp format in processWikiLinks method
This commit is contained in:
2
index.js
2
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user