fix: separate block markdown children#6
Merged
Conversation
There was a problem hiding this comment.
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.tsto separate adjacent block-ish children when serializing. - Replace inline child concatenation with a helper that conditionally inserts
\n\nbetween certain sibling boundaries. - Move/expand spacing-focused tests into a new
render-spacing.test.tsfile and remove the prior ad-hoc test fromrender.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.
bf65f76 to
f4c0a48
Compare
f4c0a48 to
afcf78c
Compare
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.
Summary
src/react/render-spacing.test.tsx.Validation
pnpm exec biome check .pnpm testpnpm build