Feat: enhance Mermaid configuration and fix initialization bug (#617)

* 🐛 Fix: Mermaid initialization conflict error

*  Feat: enhance Mermaid configuration with security level, look, and font family options
This commit is contained in:
Cell
2025-08-14 15:29:23 +08:00
committed by GitHub
parent ba6cc4ed8e
commit e04bb611dc
12 changed files with 70 additions and 29 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
{{- $file := .Options.file -}}
{{- $attrs := printf `style="width: %v; height: %v;"` $width $height -}}
<div class="echarts-container">
<div class="diagram-container">
{{- dict "Label" "Copy ECharts code" | partial "plugin/diagram-copy-btn.html" -}}
<div class="echarts" {{ $attrs | safeHTMLAttr }}></div>
{{- $content := strings.TrimSpace .Inner -}}
+2 -2
View File
@@ -1,7 +1,7 @@
{{- /* Mermaid support for code fences extended and shortcodes. */ -}}
<div class="mermaid-container">
<div class="diagram-container">
{{- dict "Label" "Copy Mermaid code" | partial "plugin/diagram-copy-btn.html" -}}
<pre class="mermaid">{{ .Inner | safeHTML }}</pre>
<template>{{ .Inner | safeHTML }}</template>
<template><pre class="mermaid">{{ .Inner | safeHTML }}</pre></template>
</div>
{{- /* EOF */ -}}