From 57967258a96326da3b408c4304e5da8c608beb24 Mon Sep 17 00:00:00 2001 From: tianyaxiang Date: Sun, 2 Feb 2025 18:33:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20Mermaid=20=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=9B=BE=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/markdown/renderer.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib/markdown/renderer.ts b/src/lib/markdown/renderer.ts index d88476d..960e2a6 100644 --- a/src/lib/markdown/renderer.ts +++ b/src/lib/markdown/renderer.ts @@ -119,10 +119,8 @@ export class MarkdownRenderer { } const styleStr = cssPropertiesToString(style) - // Generate unique ID for the diagram - const id = `mermaid-${Math.random().toString(36).substring(2)}` - - // Since we can't use async/await in the renderer, we'll return a div that will be rendered by client-side JavaScript + // Remove the random ID generation since it's not needed + // Return a simple div with the mermaid class and content return `${token.text}` } catch (error) { console.error('Mermaid rendering error:', error)