优化 Mermaid 流程图的支持

This commit is contained in:
tianyaxiang 2025-02-02 18:29:03 +08:00
parent 589370e456
commit 0bce491e86

View File

@ -58,7 +58,7 @@ export class MarkdownRenderer {
...latexStyle,
display: 'block',
margin: '1em 0',
textAlign: 'center'
textAlign: 'center' as const
}
const styleStr = cssPropertiesToString(style)
const rendered = katex.renderToString(token.text, {
@ -114,8 +114,8 @@ export class MarkdownRenderer {
...mermaidStyle,
display: 'block',
margin: '1em 0',
textAlign: 'center',
background: 'transparent' // 确保背景透明以适应主题
textAlign: 'center' as const,
background: 'transparent'
}
const styleStr = cssPropertiesToString(style)