浏览代码

fix: remove redundant Mermaid graph direction enforcement (#19024)

tags/1.4.0
Hao Cheng 6 个月前
父节点
当前提交
2a3cc43b62
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 0 次插入4 次删除
  1. 0
    4
      web/app/components/base/mermaid/utils.ts

+ 0
- 4
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()
}

正在加载...
取消
保存