[PR #783] [CLOSED] fix(markdown): style code blocks and apply renderNode updates #1561

Closed
opened 2026-03-14 09:43:18 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opentui/pull/783
Author: @ryanfreckleton
Created: 3/5/2026
Status: Closed

Base: mainHead: fix-markdown-codeblock-style


📝 Commits (3)

  • cfab273 fix(markdown): style code blocks and apply renderNode updates
  • a1b1ae8 fix(markdown): use default foreground for code blocks
  • 67c7014 fix(markdown): preserve fenced syntax highlighting

📊 Changes

2 files changed (+195 additions, -2 deletions)

View changed files

📝 packages/core/src/renderables/Markdown.ts (+70 -2)
📝 packages/core/src/renderables/__tests__/Markdown.test.ts (+125 -0)

📄 Description

Latest opencode broke rendering code blocks on solarized light now that they've switched to the experimental markdown renderer. This definitely fixes it locally, and I think it doesn't break anything else.

Summary

  • apply markdown raw/raw.block styles to fenced code blocks rendered by MarkdownRenderable
  • add a renderNode setter so JSX prop updates trigger block rebuilds
  • add regressions for styled code blocks and post-construction renderNode updates

Testing

  • bun test src/renderables/tests/Markdown.test.ts

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opentui/pull/783 **Author:** [@ryanfreckleton](https://github.com/ryanfreckleton) **Created:** 3/5/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-markdown-codeblock-style` --- ### 📝 Commits (3) - [`cfab273`](https://github.com/anomalyco/opentui/commit/cfab2736bdeb75dd9aa0f8ec3bac145b986b8c72) fix(markdown): style code blocks and apply renderNode updates - [`a1b1ae8`](https://github.com/anomalyco/opentui/commit/a1b1ae876e74392dfdc10019fdd0e03fde4d0953) fix(markdown): use default foreground for code blocks - [`67c7014`](https://github.com/anomalyco/opentui/commit/67c7014136e150102d1ce9bf938c28246511f90d) fix(markdown): preserve fenced syntax highlighting ### 📊 Changes **2 files changed** (+195 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/core/src/renderables/Markdown.ts` (+70 -2) 📝 `packages/core/src/renderables/__tests__/Markdown.test.ts` (+125 -0) </details> ### 📄 Description Latest opencode broke rendering code blocks on solarized light now that they've switched to the experimental markdown renderer. This definitely fixes it locally, and I think it doesn't break anything else. ## Summary - apply markdown raw/raw.block styles to fenced code blocks rendered by `MarkdownRenderable` - add a `renderNode` setter so JSX prop updates trigger block rebuilds - add regressions for styled code blocks and post-construction `renderNode` updates ## Testing - bun test src/renderables/__tests__/Markdown.test.ts --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 09:43:18 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#1561
No description provided.