pandoc-ext / diagram

Generate diagrams from embedded code; supports Mermaid, Dot/GraphViz, PlantUML, Asymptote, and TikZ.
MIT License
53 stars 9 forks source link

Fix issue with mmdc executable path on Windows #14

Closed leoli0605 closed 2 months ago

leoli0605 commented 5 months ago

To run the Mermaid engine on Windows, you need to use mmdc.cmd instead of mmdc.

tarleb commented 2 months ago

Thanks for the PR and apologies for the late reply.

Could you test if something like this would work as well?

self.execpath or (pandoc.system.os:match 'windows' and 'mmdc.cmd' or 'mmdc'),

I think I'd prefer the built-in OS field over querying an env-var.

leoli0605 commented 2 months ago

Hi @tarleb, I found that the issue might have been caused by my installation environment. After reinstalling mermaid-cli, I can now run mmdc smoothly without having to use mmdc.cmd. So please ignore and close this PR, thank you.

tarleb commented 2 months ago

Good to know, and thanks again!