Skip to content

fix(import): 清理 QuoteContainer 自动生成的空子块#87

Open
nengqi wants to merge 1 commit intoriba2534:mainfrom
nengqi:fix/quote-container-empty-child
Open

fix(import): 清理 QuoteContainer 自动生成的空子块#87
nengqi wants to merge 1 commit intoriba2534:mainfrom
nengqi:fix/quote-container-empty-child

Conversation

@nengqi
Copy link
Copy Markdown

@nengqi nengqi commented Apr 3, 2026

Summary

  • 飞书 API 创建 QuoteContainer 块时会自动在 index 0 生成空文本子块,导致引用块(blockquote)顶部多出一个空行
  • 此前仅对 Callout 容器做了清理,QuoteContainer 遗漏了
  • 将空子块清理逻辑扩展到 QuoteContainer,复用同一套"检查 index 0 是否为空文本块 → 删除"的防御性逻辑

Test plan

  • go test ./... 全量通过
  • 实际导入含 > 2026-04-03 对齐 的 markdown,导出验证无多余空行
  • Callout 块行为不受影响

飞书 API 创建 QuoteContainer 时会自动在 index 0 生成空文本子块,
导致引用块顶部多出一个空行。此前仅对 Callout 做了清理,现扩展到
QuoteContainer 复用同一逻辑。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant