feat(writer): add renderer (ChapterContent -> DocxInjector.Block)
This commit is contained in:
@@ -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 等 kind(renderer 依赖) ----------
|
||||
|
||||
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"
|
||||
|
||||
Reference in New Issue
Block a user