« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/upd8.js
diff options
context:
space:
mode:
Diffstat (limited to 'upd8.js')
-rwxr-xr-xupd8.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/upd8.js b/upd8.js
index 8dff388..fefc187 100755
--- a/upd8.js
+++ b/upd8.js
@@ -835,7 +835,7 @@ const replacerSpec = {
     if (error) process.exit();
 
     const categoryPart = Object.keys(replacerSpec).join('|');
-    transformInline.regexp = new RegExp(String.raw`\[\[((${categoryPart}):)?(.+?)((?<! )#.+?)?(\|(.+?))?\]\]`, 'g');
+    transformInline.regexp = new RegExp(String.raw`(?<!\\)\[\[((${categoryPart}):)?(.+?)((?<! )#.+?)?(\|(.+?))?\]\]`, 'g');
 }
 
 function transformInline(text, {strings, to}) {
@@ -884,7 +884,7 @@ function transformInline(text, {strings, to}) {
             logError`The link ${match} failed to be processed: ${error}`;
             return match;
         }
-    });
+    }).replaceAll(String.raw`\[[`, '[[');
 }
 
 function parseAttributes(string, {to}) {