Repository navigation
[Enhancement] enhance html spacing - #6617
Conversation
属于是没写完Glavo就合了 (bushi |
其实是合并完我才发现有地方不对劲((( |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c0c8f8510
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Glavo
left a comment
There was a problem hiding this comment.
本审查建议由 GPT-5.6 Sol 生成
已将具体审查建议标注在对应代码行。
| if (child instanceof AutoLineBreak || child instanceof Text txt && isSpacing(txt.getText())) { | ||
| // NO-OP | ||
| } else { | ||
| this.children.subList(i + 1, size).clear(); |
There was a problem hiding this comment.
[P2] 应清理最后一个文本节点内部的尾随空白
对于 <p>x </p> 这样的内容,Jsoup 会生成 Text("x "),后面再跟一个 AutoLineBreak。由于 isSpacing("x ") 返回 false,当前循环只会删除换行节点,却保留 x 后面的空格。这样不仅未彻底清理尾随空白,还可能影响 TextFlow 的尺寸计算和自动换行。
There was a problem hiding this comment.
我认为这不应该处理。照这么说,一个 Text 节点内如果包含了一堆连起来的换行符岂不是也得找出来?既然空格是节点的一部分就不应该处理
Upstream endpoint: cf21cf4 (HMCL-dev#6649). Integrates the audited applicable upstream changes with XYML equivalents: - HMCL-dev#6098 0443ff7: on-demand add-on changelogs and safe Swing HTML rendering. - HMCL-dev#6620 ff459a5: exact provider version links. - HMCL-dev#6617 c149401: changelog spacing. - HMCL-dev#6630 15d4874: streaming MCBBS pack metadata. - HMCL-dev#6633 8eec184: instance selector popup toggle. - HMCL-dev#6641 0807c04: 32-bit automatic-memory cap. - HMCL-dev#6642 78b8d37: missing manifest patches handling. - HMCL-dev#6636 a0d1fa8: OOM task lifecycle completion. - HMCL-dev#6649 cf21cf4: non-empty log export with native-encoding fallback. Commit HMCL-dev#6613 (5796dad) is intentionally content-skipped because it only changes the removed JavaFX image-detection/UI path. Conflict policy: retain the Swing rewrite and all XYML-specific behavior; do not restore removed JavaFX/JFoenix files. This merge makes the cached upstream history an ancestor without forcing unrelated branch differences into the resulting tree.
Upstream endpoint: cf21cf4 (HMCL-dev#6649). Integrates the audited applicable upstream changes with XYML equivalents: - HMCL-dev#6098 0443ff7: on-demand add-on changelogs and safe Swing HTML rendering. - HMCL-dev#6620 ff459a5: exact provider version links. - HMCL-dev#6617 c149401: changelog spacing. - HMCL-dev#6630 15d4874: streaming MCBBS pack metadata. - HMCL-dev#6633 8eec184: instance selector popup toggle. - HMCL-dev#6641 0807c04: 32-bit automatic-memory cap. - HMCL-dev#6642 78b8d37: missing manifest patches handling. - HMCL-dev#6636 a0d1fa8: OOM task lifecycle completion. - HMCL-dev#6649 cf21cf4: non-empty log export with native-encoding fallback. Commit HMCL-dev#6613 (5796dad) is intentionally content-skipped because it only changes the removed JavaFX image-detection/UI path. Conflict policy: retain the Swing rewrite and all XYML-specific behavior; do not restore removed JavaFX/JFoenix files. This merge makes the cached upstream history an ancestor without forcing unrelated branch differences into the resulting tree.
自己欠的债自己还(