From f81ff58c548ddc16805db2673e0b210d5a2b72da Mon Sep 17 00:00:00 2001 From: Brendan Date: Wed, 31 Jul 2024 14:02:48 +0800 Subject: [PATCH 1/2] fix: support mmdc on windows --- src/tools.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tools.rs b/src/tools.rs index ca6b816..6e8e41a 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -18,7 +18,12 @@ impl ThirdPartyTools { } pub(crate) fn mermaid(args: &[&str]) -> Tool { - Tool::new("mmdc", args) + let mmdc = if cfg!(windows) { + "mmdc.cmd" + } else { + "mmdc" + }; + Tool::new(mmdc, args) } pub(crate) fn presenterm_export(args: &[&str]) -> Tool { From b52dbb9179b4ef87188f206285b1e448a96b4265 Mon Sep 17 00:00:00 2001 From: brendan Date: Wed, 31 Jul 2024 23:57:55 +0800 Subject: [PATCH 2/2] fixup: cargo fmt on tools.rs --- src/tools.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/tools.rs b/src/tools.rs index 6e8e41a..be13384 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -18,11 +18,7 @@ impl ThirdPartyTools { } pub(crate) fn mermaid(args: &[&str]) -> Tool { - let mmdc = if cfg!(windows) { - "mmdc.cmd" - } else { - "mmdc" - }; + let mmdc = if cfg!(windows) { "mmdc.cmd" } else { "mmdc" }; Tool::new(mmdc, args) }