Conversation
Greptile Summary本 PR 修复了有框定理(ornament/decorated 环境)中脚注正文不显示的问题。根本原因在于:ornament 渲染路径在将内部 Confidence Score: 5/5可合并,修复逻辑清晰,有单元测试覆盖,剩余反馈均为 P2 级别 核心修复(ornament/art_box 路径的脚注传播)逻辑正确,bridge 和 lazy 两条路径均已同步处理,并有对应单元测试。剩余两个问题(canvas 子类的潜在副作用和测试中的辅助函数重复)均为 P2,不影响主要功能路径,不阻碍合并。 src/Typeset/Bridge/bridge_gui.cpp — 关注 bridge_canvas_rep 是否应向外传播内部 float
|
| Filename | Overview |
|---|---|
| src/Typeset/Bridge/bridge_gui.cpp | 在 typeset_ornament 中收集 ornament_fl,并在 insert_ornament 中重挂到外层 page_item;逻辑正确,但修改同时影响了 bridge_canvas_rep 这一子类,可能造成 canvas 中的脚注意外出现在页面底部 |
| src/Typeset/Line/lazy_gui.cpp | 在 lazy_ornament_rep::produce 和 lazy_art_box_rep::produce 的 LAZY_VSTREAM 路径中补充了 float 收集与重挂逻辑,与 bridge 路径行为一致 |
| src/Typeset/Format/page_item.cpp | 新增 collect_attached_floats 工具函数,正确提取并合并 page_item 数组中所有附着的 float |
| src/Typeset/Format/page_item.hpp | 声明 collect_attached_floats,使 bridge 和 lazy 路径均可直接引用而无需各自重复实现 |
| tests/Typeset/Bridge/bridge_gui/bridge_ornamented_rep_test.cpp | 单元测试验证 float 附着逻辑,但测试中本地定义了 collect_attached_floats_for_test,是对 page_item.hpp 中同名公共函数的重复 |
| tests/Typeset/Line/lazy_gui/lazy_ornament_rep_test.cpp | 通过完整排版 ORNAMENT 树并检查 LAZY_VSTREAM 结果中是否含脚注,端到端验证 lazy 路径的修复效果 |
Sequence Diagram
sequenceDiagram
participant BT as bridge_ornamented_rep
participant TO as typeset_ornament()
participant CAF as collect_attached_floats()
participant IO as insert_ornament()
participant PI as page_item (outer)
BT->>TO: my_typeset(desired_status)
TO->>TO: body->typeset() → local page_items l2
TO->>CAF: collect_attached_floats(l2)
CAF-->>TO: ornament_fl (脚注等 floats)
TO->>TO: ornament_fl = 收集结果
TO-->>BT: ornament box b
BT->>IO: insert_ornament(b)
IO->>IO: par->format_paragraph()
IO->>PI: sss->l[last]->fl << ornament_fl
IO-->>BT: ttt->insert_stack(par->sss->l, …)
Reviews (5): Last reviewed commit: "wip" | Re-trigger Greptile
|
Tip: Greploop — Automatically fix all review issues by running Use the Greptile plugin for Claude Code to query reviews, search comments, and manage custom context directly from your terminal. |
| } | ||
|
|
||
| box | ||
| bridge_ornamented_rep::typeset_ornament (int desired_status) { |
There was a problem hiding this comment.
doxygen style comment in Chinese
#ISSUE #3050