From c18d6d7d1e8c0aed07455b9e37737f559648d0b2 Mon Sep 17 00:00:00 2001 From: Zhengshou Lai Date: Tue, 19 May 2026 21:52:20 +0800 Subject: [PATCH] fix(convert): auto-load default template for md-to-docx Remove the hard-coded `template != \"default\"` guard so that the default reference docx template is loaded automatically when no --reference-doc is explicitly provided. --- bin/commands/convert.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/commands/convert.py b/bin/commands/convert.py index b8fb799..a1a77f0 100644 --- a/bin/commands/convert.py +++ b/bin/commands/convert.py @@ -96,7 +96,7 @@ def convert_cmd(inputs, output, template, quality, density, reference_doc, bookm # --- md → docx --- if all(p.suffix.lower() == ".md" for p in input_paths) and out_ext == ".docx": ref_doc = reference_doc - if not ref_doc and template != "default": + if not ref_doc: ref_path = templates_registry.get_md_to_docx_root() / template / "template.docx" if ref_path.exists(): ref_doc = str(ref_path)