Skip to content

Mermaid code blocks are not rendered by the extension, while VS Code's native Markdown preview renders them correctly #326349

Description

@Tanishq-JM

Bug Report

Summary

The extension does not render Mermaid code blocks in Markdown, even though the exact same Markdown is rendered correctly by VS Code's native Markdown preview.

This creates inconsistent behavior between the built-in renderer and the extension. Since Mermaid support is already available natively in VS Code, I expected the extension to render the diagrams as well.

Expected Behavior

Mermaid code blocks should be rendered as diagrams, matching the behavior of VS Code's native Markdown preview.

Actual Behavior

The extension displays the Mermaid code block as plain text (or does not render it at all), while the native VS Code Markdown preview renders the diagram correctly.

Steps to Reproduce

  1. Open a Markdown file.
  2. Add a Mermaid code block, for example:
```mermaid
graph TD
    A[Start] --> B[Process]
    B --> C[End]
```
  1. Open the Markdown using the extension's preview/rendering feature.
  2. Observe that the Mermaid diagram is not rendered.
  3. Open the same file using VS Code's native Markdown Preview.
  4. Observe that the Mermaid diagram renders correctly.

Expected Result

Both the extension and VS Code's native Markdown preview should render the Mermaid diagram identically.

Actual Result

Only the native Markdown preview renders the diagram. The extension fails to render it.

Additional Information

This appears to be a missing or incomplete Mermaid rendering implementation in the extension. Since VS Code already supports Mermaid diagrams natively, it would be great if the extension could provide equivalent rendering behavior for compatibility and consistency.

Thank you for looking into this issue.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugmarkdown

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions