Skip to content

feat(markdown): render blockquotes as container with left border#693

Draft
remorses wants to merge 3 commits intoanomalyco:mainfrom
remorses:feat/markdown-blockquote-container
Draft

feat(markdown): render blockquotes as container with left border#693
remorses wants to merge 3 commits intoanomalyco:mainfrom
remorses:feat/markdown-blockquote-container

Conversation

@remorses
Copy link
Contributor

Split from #597 to make review easier. Depends on #692.

Replaces flat text chunk blockquote rendering with a BoxRenderable using border: ["left"] and customBorderChars with > as the vertical char. Content is rendered as children, so nested blocks work correctly. Fixes multi-line quotes losing the > prefix on continuation lines.

Morse added 3 commits February 16, 2026 14:21
…istency

Extract createBlockRenderable() as a centralized dispatch method that
maps token types to their corresponding renderables. This replaces
the scattered if/else logic in createDefaultRenderable().

Also extract getBlockMarginBottom() helper to replace repeated
ternary expressions, and fix a bug where marginBottom was not being
updated when tokens were unchanged (the fast paths in updateBlocks
for same-reference and same-raw tokens now properly set marginBottom
on the existing renderable).
When createBlockRenderable is called for nested content (e.g. inside
blockquote children), space tokens should produce a visible renderable
rather than returning null. The top-level createDefaultRenderable still
filters out space tokens for block-level rendering.
Replace flat text chunk rendering of blockquotes with a BoxRenderable
that uses border: ['left'] and customBorderChars with '>' as the
vertical character. Content is rendered as children inside the box,
so nested blocks (lists, code, other quotes) work correctly.

This fixes the issue where multi-line blockquotes lost the '>' prefix
on continuation lines.

Adds createBlockquoteRenderable, addBlockquoteChildren, and
updateBlockquoteRenderable methods, and handles blockquotes in both
updateBlockRenderable and rerenderBlocks paths.
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 16, 2026

@opentui/core

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core@693

@opentui/react

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/react@693

@opentui/solid

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/solid@693

@opentui/core-darwin-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-darwin-arm64@693

@opentui/core-darwin-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-darwin-x64@693

@opentui/core-linux-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-linux-arm64@693

@opentui/core-linux-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-linux-x64@693

@opentui/core-win32-arm64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-win32-arm64@693

@opentui/core-win32-x64

npm i https://pkg.pr.new/anomalyco/opentui/@opentui/core-win32-x64@693

commit: c1f22ec

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