From 38b131556d5740ee7c11790539941d1862469112 Mon Sep 17 00:00:00 2001 From: zerone0x Date: Thu, 5 Mar 2026 16:06:26 +0800 Subject: [PATCH] fix(tui): use markdownCodeBlock color for fenced code blocks without language Code blocks without a language specifier (``` without language tag) were using theme.markdownCode (inline code color) instead of theme.markdownCodeBlock. On light terminal backgrounds with custom themes, markdownCode is typically a bright accent color (e.g., green, pink) that becomes invisible against light backgrounds. markdownCodeBlock is designed for this purpose and defaults to the foreground text color. Fixes #16121 Co-Authored-By: Claude --- packages/opencode/src/cli/cmd/tui/context/theme.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/context/theme.tsx b/packages/opencode/src/cli/cmd/tui/context/theme.tsx index 2320c08ccc6..c905ccba515 100644 --- a/packages/opencode/src/cli/cmd/tui/context/theme.tsx +++ b/packages/opencode/src/cli/cmd/tui/context/theme.tsx @@ -932,13 +932,13 @@ function getSyntaxRules(theme: Theme) { }, }, { - scope: ["markup.raw", "markup.raw.block"], + scope: ["markup.raw.block"], style: { - foreground: theme.markdownCode, + foreground: theme.markdownCodeBlock, }, }, { - scope: ["markup.raw.inline"], + scope: ["markup.raw", "markup.raw.inline"], style: { foreground: theme.markdownCode, background: theme.background,