feat(writer): add renderer (ChapterContent -> DocxInjector.Block)

This commit is contained in:
lhl
2026-08-13 10:08:41 +08:00
parent 9f53d928ab
commit 1c40262401
3 changed files with 58 additions and 0 deletions
+8
View File
@@ -87,3 +87,11 @@ def test_original_content_style_preserved(tmp_path):
# 模板原有段落(尾部固定内容)在注入后仍存在且未被破坏
assert any("尾部固定内容" in p.text for p in out.paragraphs)
# ---------- Block 支持 table/list/note 等 kindrenderer 依赖) ----------
def test_block_accepts_table_list_note():
assert Block(kind="table", text="t", rows=[["x"]]).kind == "table"
assert Block(kind="list", text="a\nb").kind == "list"
assert Block(kind="note", text="n").kind == "note"