From a601c229e6dbee788a035125c33ba65a48842b59 Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 16 Oct 2026 14:13:26 +0900 Subject: [PATCH] =?UTF-8?q?detective-app:=20=EB=A9=94=EB=AA=A8=EC=9D=98=20?= =?UTF-8?q?=ED=83=AD=20=EA=B5=AC=EB=B6=84=20=ED=91=9C(=EC=9B=B9/=EC=97=91?= =?UTF-8?q?=EC=85=80=20=EB=B3=B5=EC=82=AC=EB=B3=B8)=EB=8F=84=20=ED=91=9C?= =?UTF-8?q?=EB=A1=9C=20=EB=A0=8C=EB=8D=94=EB=A7=81?= 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 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/web-ui/html/detective-app.html b/web-ui/html/detective-app.html index b508bdb..e438434 100644 --- a/web-ui/html/detective-app.html +++ b/web-ui/html/detective-app.html @@ -929,10 +929,27 @@ function onPriChange(){ function onNotesChange(){/* auto-save on blur */} // 메모에 마크다운 표가 있으면, 편집 중이 아닐 때 표를 렌더링해서 보여준다(클릭하면 다시 편집). // 저장되는 값은 항상 textarea의 원문 그대로다. 표가 없는 메모는 지금처럼 textarea만 쓴다. +// 웹/엑셀에서 표를 복사하면 탭으로 구분된 줄이 붙는다. 탭이 든 줄이 2줄 이상 연속이면 첫 줄을 머리글로 한 +// 마크다운 표로 바꿔서 보여준다(표시용 변환일 뿐, 저장된 원문은 그대로). +function notesTabsToMd(raw){ + const lines=raw.split('\n'),out=[]; + const isTab=l=>l.replace(/^[\t ]+|[\t ]+$/g,'').includes('\t'); + const row=l=>'| '+l.replace(/^[\t ]+|[\t ]+$/g,'').split('\t').map(c=>c.trim().replace(/\|/g,'\\|')).join(' | ')+' |'; + for(let i=0;i=2){ + const n=lines[i].replace(/^[\t ]+|[\t ]+$/g,'').split('\t').length; + out.push(row(lines[i]),'|'+Array(n).fill('---').join('|')+'|'); + for(let k=i+1;k/g,'>');