Mermaid in CommentsRender Mermaid diagrams inside Python docstrings and source comments directly in the VS Code editor. Move the cursor into a diagram fence to edit its source. Click Open Mermaid Preview above the fence to view the diagram at full size beside the editor. 在 VS Code 源码编辑器里原位显示 Mermaid 图。光标进入围栏时恢复源码,移开后重新显示图。点击 Open Mermaid Preview 可在旁边查看原尺寸图。 InstallationInstall the UsageWrite a Mermaid fence inside a triple-quoted Python module, class or function docstring. The
The same fences work in Python Mermaid 12.4.0 renders static SVG locally, including built-in diagram types, front matter and ELK layout. External image and icon resources and click callbacks are outside the static preview. Inline diagrams fit the lines occupied by their fences. Use Build from sourceUse Node.js 22.12 or later and run |