Skip to content

Incorrect Mermaid rendering when markdown-pdf.executablePath is not configured #422

@tsu-git

Description

@tsu-git

Description

When exporting a Markdown file containing Mermaid diagrams, the diagrams are not rendered correctly (they remain as code blocks) unless the markdown-pdf.executablePath is explicitly set. Although a similar issue has been reported in #342, I would like to propose an improvement to the documentation (README) to help users resolve this configuration requirement more easily.

Steps to Reproduce

Environment

  • OS: Windows 11 Pro 25H2 (Confirmed also on macOS and Ubuntu)
  • VS Code: 1.109.2
  • Extension Version: 1.5.0

Sample Code

```mermaid
stateDiagram
    [*] --> First
    state First {
        [*] --> second
        second --> [*]
    }
```

Procedures

  1. Leave markdown-pdf.executablePath as default (empty).
  2. Right-click the editor and select "Markdown PDF: Export (PNG)".
  3. Check the output result.
  4. Set the markdown-pdf.executablePath (following the English Documentation).
  5. Export again and check the output.

Results

Setting Output Result
Not Configured Image
Configured Image

Note: The same behavior was observed on macOS and Ubuntu environments.

Proposed Improvement

I suggest updating the README to clarify this requirement for Mermaid users:

  1. Add a direct link to the markdown-pdf.executablePath section near the Mermaid input example.
  2. Add a note to the markdown-pdf.executablePath description:

    "When using diagram features like Mermaid, this setting may be required for proper rendering. Otherwise, diagrams may be output as raw code blocks."


I would be happy to submit a Pull Request (PR) to update both README.md and README.ja.md with these improvements if you agree with this proposal. Please let me know what you think!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions