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.
This commit is contained in:
Zhengshou Lai
2026-05-19 21:52:20 +08:00
parent 4fd4477a27
commit c18d6d7d1e
+1 -1
View File
@@ -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)