From b0557c77a03148374e2aa99b7e3ecd9525a25c32 Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 16 Oct 2026 14:19:27 +0900 Subject: [PATCH] =?UTF-8?q?detective-app:=20=EB=A9=94=EB=AA=A8=20=EB=B3=B4?= =?UTF-8?q?=EA=B8=B0=EC=97=90=EC=84=9C=20=ED=95=9C=20=EC=A4=84=EB=A1=9C=20?= =?UTF-8?q?=EB=AD=89=EC=B9=9C=20=EB=B2=88=ED=98=B8=EB=AA=A9=EB=A1=9D=20?= =?UTF-8?q?=EB=B6=84=EB=A6=AC,=20'=ED=95=AD=EB=AA=A9:=20-=20=EB=82=B4?= =?UTF-8?q?=EC=9A=A9'=20=ED=95=98=EC=9C=84=ED=95=AD=EB=AA=A9=ED=99=94,=20[?= =?UTF-8?q?=ED=85=8D=EC=8A=A4=ED=8A=B8](=EB=A7=81=ED=81=AC)=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 5.5 --- web-ui/html/detective-app.html | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/web-ui/html/detective-app.html b/web-ui/html/detective-app.html index 334b3fd..3ea9c83 100644 --- a/web-ui/html/detective-app.html +++ b/web-ui/html/detective-app.html @@ -966,10 +966,36 @@ function notesTabsToMd(raw){ function notesRender(raw){ const esc=t=>t.replace(/&/g,'&').replace(//g,'>'); const inl=t=>t.replace(/`([^`]+)`/g,'$1').replace(/\*\*(.+?)\*\*/g,'$1') - .replace(/(https?:\/\/[^\s<)]+)/g,'$1'); + .replace(/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,'$1') + .replace(/(^|[^"=>])(https?:\/\/[^\s<)]+)/g,'$1$2'); const indentOf=l=>{let n=0;for(const ch of l){if(ch==='\t')n+=4;else if(ch===' ')n++;else break;}return n;}; - const LI=/^(\s*)([-*•·▪‣◦○●■□→]|\d+[.)]|\(\d+\)|[가-힣][.)])\s+(.*)$/; - const lines=notesTabsToMd(raw).split('\n'); + const LI=/^(\s*)([-*•·▪‣◦○●■□→]|\d{1,2}[.)]|\(\d{1,2}\)|[가-힣][.)])\s+(.*)$/; + // 한 줄로 뭉쳐 붙여넣은 번호 목록("1. … 2. … 3. …")을 항목별로 나누고, "항목: - 내용"은 하위 항목으로 내린다. + // 번호가 1,2,3처럼 이어질 때만 나눠서 날짜(2026. 3. 5.) 같은 건 건드리지 않는다. + const expand=arr=>{ + const merged=[]; + for(let k=0;k0&&ln.slice(0,seq[0].at).trim())res.push(ln.slice(0,seq[0].at).trim()); + seq.forEach((h,k)=>{ + const piece=ln.slice(h.at,k+11){res.push(parts[0]+':');for(const sub of parts.slice(1))res.push(' - '+sub.trim());} + else res.push(piece); + }); + } + return res; + }; + const lines=expand(notesTabsToMd(raw).split('\n')); const out=[];let i=0,para=null; const flush=()=>{if(para){out.push('
'+para.join('
')+'
');para=null;}}; const pushText=(html,rawLine)=>{