pandoc-ext / diagram

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

Fix issue with mmdc executable path on Windows #14

Closed leoli0605 closed 6 months ago

leoli0605 commented 9 months ago

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

tarleb commented 6 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 6 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 6 months ago

Good to know, and thanks again!