Skip to content

[Enhancement] enhance html spacing - #6617

Merged
Glavo merged 4 commits into
HMCL-dev:mainfrom
ToobLac:hs
Aug 9, 2026
Merged

Glavo merged 4 commits into
HMCL-dev:mainfrom
ToobLac:hs

Conversation

@ToobLac

@ToobLac ToobLac commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor
  • 分割线前方添加空行
  • 移除头部的空行以及尾部的空行和空格
  • 渲染时现设置一次图片宽度,以免图片加载得太快导致宽度没有绑定

自己欠的债自己还(

@ToobLac
ToobLac marked this pull request as ready for review August 6, 2026 11:18
@github-actions github-actions Bot added the 10+ label Aug 6, 2026
@github-actions github-actions Bot added 40+ and removed 10+ labels Aug 6, 2026
@Minecraft269

Copy link
Copy Markdown
Contributor
  • 分割线前方添加空行
  • 移除头部的空行以及尾部的空行和空格

自己欠的债自己还(

属于是没写完Glavo就合了 (bushi

@ToobLac

ToobLac commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

属于是没写完Glavo就合了 (bushi

其实是合并完我才发现有地方不对劲(((

@Glavo

Glavo commented Aug 6, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 Glavo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

本审查建议由 GPT-5.6 Sol 生成


已将具体审查建议标注在对应代码行。

Comment on lines +537 to +540
if (child instanceof AutoLineBreak || child instanceof Text txt && isSpacing(txt.getText())) {
// NO-OP
} else {
this.children.subList(i + 1, size).clear();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] 应清理最后一个文本节点内部的尾随空白

对于 <p>x </p> 这样的内容,Jsoup 会生成 Text("x "),后面再跟一个 AutoLineBreak。由于 isSpacing("x ") 返回 false,当前循环只会删除换行节点,却保留 x 后面的空格。这样不仅未彻底清理尾随空白,还可能影响 TextFlow 的尺寸计算和自动换行。

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我认为这不应该处理。照这么说,一个 Text 节点内如果包含了一堆连起来的换行符岂不是也得找出来?既然空格是节点的一部分就不应该处理

@github-actions github-actions Bot added 10+ and removed 40+ labels Aug 6, 2026
@Glavo
Glavo merged commit c149401 into HMCL-dev:main Aug 9, 2026
3 checks passed
@ToobLac
ToobLac deleted the hs branch August 10, 2026 13:37
MinecraftSTL pushed a commit to MinecraftSTL/XYML that referenced this pull request Aug 17, 2026
MinecraftSTL added a commit to MinecraftSTL/XYML that referenced this pull request Aug 17, 2026
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.
MinecraftSTL added a commit to MinecraftSTL/XYML that referenced this pull request Aug 18, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants