审查 P1:docx_brief 与 docx_manuscript 的 render_md_block 各手写一套块级 扫描,同一 md 走两条路径最易漂移。按「分派语义留 profile、边界收集归 common」 拆分: - common 新增 gather_fence(闭合判据单一事实源)/ gather_table / gather_blockquote / gather_paragraph(软换行并合,is_list 谓词注入) ——此前两份逐字拷贝的循环全部换成共享调用 - brief 的 add_inline_rich 手写 INLINE_RE 循环换 common.parse_inline 迭代 (与 manuscript 同一切分事实源);brief 差异收敛到 plain 段处理 (引文上标 + 化学式)一处 - 刻意不动:分派顺序与 brief 状态机(in_refs/expect_meta/in_tldr 会改变块 边界语义,是 profile 的产品行为不是重复)、各 profile 样式 验收:golden 基线(上一提交)逐字节零 diff;319 测试全过。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| common.py | ||
| docx_brief.py | ||
| docx_manuscript.py | ||
| pdf.py | ||
| render.py | ||