From 1bac437d6e48491f44e8fdc7262acba1ee81eee3 Mon Sep 17 00:00:00 2001 From: Ole Eskild Steensen Date: Tue, 15 Mar 2022 15:26:58 +0100 Subject: [PATCH] More specific checks for mathjax and excalidraw --- .eleventy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index ab47ddd..03d566c 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -83,7 +83,7 @@ module.exports = function(eleventyConfig) { eleventyConfig.addTransform('link', function(str) { return str && str.replace(/\[\[(.*?)\]\]/g, function(match, p1) { //Check if it is an embedded excalidraw drawing or mathjax javascript - if (p1.indexOf(",") > -1) { + if (p1.indexOf("],[") > -1 || p1.indexOf('"$"')) { return match; } const [fileName, linkTitle] = p1.split("|"); @@ -124,4 +124,4 @@ module.exports = function(eleventyConfig) { passthroughFileCopy: true, }; -}; \ No newline at end of file +};