From cf4e207bfb2e1a8cf2264bcfa8a3eaebb418786b Mon Sep 17 00:00:00 2001 From: admin Date: Tue, 11 Aug 2026 21:05:32 +0800 Subject: [PATCH] =?UTF-8?q?demo(scql):=20=E4=BF=AE=E5=A4=8D=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E5=9D=97=20SyntaxError=20=E5=AF=BC=E8=87=B4=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E7=A4=BA=E4=BE=8B/=E8=BF=90=E8=A1=8C=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E5=A4=B1=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第 275 行模板字符串内嵌字符串字面量少一个右单引号: fill="${get('--panel-2)}" ❌ 语法错误 → 整个 script 不执行 fill="${get('--panel-2')}" ✅ 修 修复前症状(Playwright 实测): - pageerror: SyntaxError: Invalid or unexpected token - 初始 textarea 完全为空(loadExample 未跑) - 点击「加载示例」无任何反应 - 点击「运行」无反应 修复后实测: - bank textarea 自动填入 109 字符(10 行示例) - shop textarea 自动填入 77 字符(9 行示例) - 点击 #btn-run 后 statTime=77ms / statIntersect=6 / statWhere=3 / statGroup=3 - 无 JS 报错 --- demo/scql/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/scql/index.html b/demo/scql/index.html index a452b16..2a33e20 100644 --- a/demo/scql/index.html +++ b/demo/scql/index.html @@ -272,7 +272,7 @@ function buildFlowSvg() { const bg = n.color === 'alice' ? get('--alice-bg') : n.color === 'bob' ? get('--bob-bg') : get('--panel-2)'); const w = 100, h = 36, x0 = n.x - w/2, y0 = n.y - h/2; let sN = ``; - sN += ``; + sN += ``; sN += `${escapeHtml(n.label)}`; sN += `${escapeHtml(n.sub)}`; sN += ``;