Repository navigation
fix(docx): 修复 docx 导出第二轮 8 项质量问题(单元格行内丢失/列宽/独立编号/emoji/间距/间隔线/callout) - #17
Merged
Merged
Conversation
- 表格数据单元格:行内子节点统一「单段落 + inlineChildren」序列化,修复 **P0** 纯粗体单元格空白与 text+inlineCode 拆段 - 列宽:extractCellText 补采 inlineCode/math/image-alt 文本;分配算法改为 内容×120+220 起步、min 800、总和恒 9026;超页宽按 min+超出等比压缩;列数≥12 负预算退化为比例缩放 - 编号:每个有序列表独占 abstractNum(id==numId),WPS 不再跨列表续计数;start≠1 保留 startOverride - emoji:docx 文本 run 清除 astral emoji(1F000–1FAFF)+ FE0E/FE0F + ZWJ,保留 BMP 符号;无 emoji 文本不受影响 - 单元格段落显式 before=0/after=0/单倍行距;表头 tcPr 顺序修正 tcW→shd→vAlign;tblPr 顺序修正 tblBorders→tblLayout - 删除 --- 水平线输出(thematicBreak 不产出) - callout:标题与正文分段落(标题加粗、正文常规);头段 pPr 顺序修正 spacing<ind;无标题 callout 不再误加粗 - toDocx 复用 render.ts FRONTMATTER_RE 剥离 frontmatter(CLI 导出对齐 HTML 路径) - 回归测试 +14(回归#16-a..-l);全量 318/318;web bundle 重建 fixes #16
This was referenced Sep 14, 2026
lqtdys
added a commit
that referenced
this pull request
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Impact
修复 issue #16(用户第二轮实测反馈)8+1 项 docx 导出质量问题(含 #9 未彻底解决项):
**P0**落入默认分支被丢弃(空单元格)、text+inlineCode+text被拆成 3 段。统一改为「单段落 + inlineChildren」。extractCellText未采集 inlineCode 等value型文本 → 文件名列仅得 min 800。新算法:内容×120+220 起步(min 800),总和恒 9026;超页宽按「min + 超出部分等比」压缩;列数≥12 负预算退化为比例缩放。before=0/after=0/单倍;表头tcPr顺序修正tcW→shd→vAlign(schema)。---间隔线:删除(thematicBreak 不产出)。spacing<ind;无标题 callout 不再误加粗。toDocx复用render.ts的FRONTMATTER_RE剥离 frontmatter(CLI 导出与 HTML 路径对齐)。另含 tblPr 元素顺序修正(tblBorders→tblLayout)与 web bundle 重建(供 md-bundle vendor 同步)。
注:
docx.ts/docx.test.ts含少量格式重排(换行风格差异,无行为变化)。Verification
bash scripts/verify.sh全绿(含 site build drift check)Risk
low — 单一模块(docx 手写 OOXML 序列化)+ 回归测试;HTML / md / mdpkg 路径行为不变;bundle 由构建生成。
Closes #16