Skip to content

fix: separate block markdown children#6

Merged
SoonIter merged 1 commit into
mainfrom
adjust-children-markdown-spacing
May 21, 2026
Merged

fix: separate block markdown children#6
SoonIter merged 1 commit into
mainfrom
adjust-children-markdown-spacing

Conversation

@SoonIter
Copy link
Copy Markdown
Owner

@SoonIter SoonIter commented May 21, 2026

Summary

  • Separate adjacent block and transparent-wrapper children with blank lines during Markdown serialization.
  • Keep inline siblings, punctuation, raw Markdown text nodes, and fenced code content unchanged.
  • Move sticky child-boundary coverage into src/react/render-spacing.test.tsx.
  • Address review feedback by treating only existing blank-line boundaries as already separated.

Validation

  • pnpm exec biome check .
  • pnpm test
  • pnpm build
  • 2000 transparent block sibling smoke via built output: 26ms

Copilot AI review requested due to automatic review settings May 21, 2026 09:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts Markdown serialization to insert blank lines between adjacent block-level/transparent-wrapper siblings, preventing merged output like Row 1Row 2, and relocates the related regression coverage into a dedicated spacing test suite.

Changes:

  • Add child-boundary spacing logic in render.ts to separate adjacent block-ish children when serializing.
  • Replace inline child concatenation with a helper that conditionally inserts \n\n between certain sibling boundaries.
  • Move/expand spacing-focused tests into a new render-spacing.test.ts file and remove the prior ad-hoc test from render.test.tsx.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/react/render.ts Introduces block-boundary detection and conditional blank-line insertion between certain adjacent children during Markdown generation.
src/react/render.test.tsx Removes the prior “two rows” adjacency test that is now covered in the dedicated spacing suite.
src/react/render-spacing.test.ts Adds focused coverage for spacing behavior across transparent wrappers, markdown blocks, inline punctuation, and raw/fenced markdown text.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/react/render.ts
@SoonIter SoonIter force-pushed the adjust-children-markdown-spacing branch 2 times, most recently from bf65f76 to f4c0a48 Compare May 21, 2026 10:47
@SoonIter SoonIter force-pushed the adjust-children-markdown-spacing branch from f4c0a48 to afcf78c Compare May 21, 2026 11:04
@SoonIter SoonIter merged commit 015cc48 into main May 21, 2026
3 checks passed
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.

2 participants