From 5a79dd0dc91131e7eb782dc011dd0bad0d3b2547 Mon Sep 17 00:00:00 2001 From: Nathan Esquenazi Date: Tue, 14 Apr 2026 21:13:34 +0000 Subject: [PATCH] fix: remove double semicolon in inlineMd link stash restore --- static/ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/ui.js b/static/ui.js index 2a27d1c..cf22b68 100644 --- a/static/ui.js +++ b/static/ui.js @@ -467,7 +467,7 @@ function renderMd(raw){ const _link_stash=[]; t=t.replace(/\[([^\]]+)\]\((https?:\/\/[^\)]+)\)/g,(_,lb,u)=>{_link_stash.push(`${esc(lb)}`);return `\x00L${_link_stash.length-1}\x00`;}); t=t.replace(/(https?:\/\/[^\s<>"')\]]+)/g,(url)=>{const trail=url.match(/[.,;:!?)]$/)?url.slice(-1):'';const clean=trail?url.slice(0,-1):url;return `${esc(clean)}${trail}`;}); - t=t.replace(/\x00L(\d+)\x00/g,(_,i)=>_link_stash[+i]);; + t=t.replace(/\x00L(\d+)\x00/g,(_,i)=>_link_stash[+i]); // Escape any plain text that isn't already wrapped in a tag we produced // by escaping bare < > that aren't part of our own tags const SAFE_INLINE=/^<\/?(strong|em|code|a)([\s>]|$)/i;