vscode-markdown-preview-enhanced
vscode-markdown-preview-enhanced copied to clipboard
[BUG] Mermaid diagrams containing math and MathJax math cannot coexist
Describe the bug
The presence of the following two things at the same time will break math in mermaid diagrams:
- Mermaid diagrams containing math
- MathJax math
Environment
- Windows 11
- VS Code
Version: 1.98.2 (user setup) Commit: ddc367ed5c8936efe395cffeec279b04ffd7db78 Date: 2025-03-12T13:32:45.399Z Electron: 34.2.0 ElectronBuildId: 11161602 Chromium: 132.0.6834.196 Node.js: 20.18.2 V8: 13.2.152.36-electron.0 OS: Windows_NT x64 10.0.26100 - Markdown Preview Enhanced: 0.8.18
To reproduce
-
Configure the following in settings.json:
"markdown-preview-enhanced.mathRenderingOption": "MathJax", -
Create a Markdown file like this:
```mermaid flowchart TD test{"$$\frac{1}{2}$$"} ``` ```math \alpha ``` -
Get the following result
Expected behavior
I'd like to see math in Mermaid diagrams not break even when using MathJax.
Additional context
With KaTeX, this problem does not occur. I get the below result with KaTex. I hope that the same result will be achieved with MathJax.
hey @shd101wyy , Wanted to jump on this, is it possible to assigned ?
thank you kindly