From a7af3877b862b24a7b5fa9631c2a9f8cfda42e6e Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Sat, 24 Jan 2026 21:43:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=20Mermaid=20=E6=B8=B2=E6=9F=93?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test-codeblock-magic.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test-codeblock-magic.html b/tests/test-codeblock-magic.html index aeb7cdf..5aac4af 100644 --- a/tests/test-codeblock-magic.html +++ b/tests/test-codeblock-magic.html @@ -269,15 +269,17 @@ classDiagram const code = block.textContent; try { - mermaid.render(id, code).then(result => { + // Mermaid 10.x 使用 render 方法,返回 Promise + mermaid.render(id, code).then(function(result) { block.innerHTML = result.svg; console.log('[Mermaid] 成功渲染图表 ' + (index + 1)); - }).catch(error => { + }).catch(function(error) { console.error('[Mermaid] 渲染失败:', error); block.innerHTML = '