From 2a3cc43b620886b06bcbeb3d8310f3bff8947896 Mon Sep 17 00:00:00 2001 From: Hao Cheng Date: Tue, 29 Apr 2025 09:10:38 +0200 Subject: [PATCH] fix: remove redundant Mermaid graph direction enforcement (#19024) --- web/app/components/base/mermaid/utils.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/web/app/components/base/mermaid/utils.ts b/web/app/components/base/mermaid/utils.ts index 9c7ab4a7b5..7d94150d12 100644 --- a/web/app/components/base/mermaid/utils.ts +++ b/web/app/components/base/mermaid/utils.ts @@ -22,10 +22,6 @@ export function preprocessMermaidCode(code: string): string { .replace(/section\s+([^:]+):/g, (match, sectionName) => `section ${sectionName}:`) // Fix common syntax issues .replace(/fifopacket/g, 'rect') - // Ensure graph has direction - .replace(/^graph\s+((?:TB|BT|RL|LR)*)/, (match, direction) => { - return direction ? match : 'graph TD' - }) // Clean up empty lines and extra spaces .trim() }