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:
@@ -96,7 +96,7 @@ def convert_cmd(inputs, output, template, quality, density, reference_doc, bookm
|
|||||||
# --- md → docx ---
|
# --- md → docx ---
|
||||||
if all(p.suffix.lower() == ".md" for p in input_paths) and out_ext == ".docx":
|
if all(p.suffix.lower() == ".md" for p in input_paths) and out_ext == ".docx":
|
||||||
ref_doc = reference_doc
|
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"
|
ref_path = templates_registry.get_md_to_docx_root() / template / "template.docx"
|
||||||
if ref_path.exists():
|
if ref_path.exists():
|
||||||
ref_doc = str(ref_path)
|
ref_doc = str(ref_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user