JSON code blocks strip quotation marks in TUI markdown renderer #5326

Open
opened 2026-02-16 17:51:22 -05:00 by yindo · 0 comments
Owner

Originally created by @jhogstrom on GitHub (Jan 13, 2026).

Originally assigned to: @kommander on GitHub.

Environment:

  • OpenCode version: 1.1.16
  • Terminal: bash with xterm-256color
  • OS: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2)
  • Interface: OpenCode TUI

Description:

When the assistant responds with JSON code blocks in the OpenCode TUI, double quotation marks are not rendered/displayed, making the JSON examples appear invalid and confusing for users.

Steps to Reproduce:

  1. Launch OpenCode TUI in bash terminal
  2. Ask the assistant a question about JSON configuration (e.g., "how do I configure opencode.json?")
  3. Observe the JSON code blocks in the response

Expected Behavior:
JSON code blocks should display with proper quotation marks around keys and values:

{
  "key": "value"
}

Actual Behavior:
JSON code blocks display without quotation marks:

{
  key: value
}

Additional Context:

  • Quotation marks appear correctly in regular text and bullet lists
  • The issue only affects code blocks (specifically JSON, but may affect other languages)
  • This makes it impossible to show valid JSON syntax to users
  • The assistant's response likely contains the quotes, but the TUI markdown renderer strips them during display

Impact:

  • High - Makes it difficult to provide accurate JSON configuration examples
  • Users may copy invalid JSON syntax
  • Creates confusion about proper JSON formatting
Originally created by @jhogstrom on GitHub (Jan 13, 2026). Originally assigned to: @kommander on GitHub. **Environment:** - OpenCode version: 1.1.16 - Terminal: bash with xterm-256color - OS: WSL2 (Linux 6.6.87.2-microsoft-standard-WSL2) - Interface: OpenCode TUI **Description:** When the assistant responds with JSON code blocks in the OpenCode TUI, double quotation marks are not rendered/displayed, making the JSON examples appear invalid and confusing for users. **Steps to Reproduce:** 1. Launch OpenCode TUI in bash terminal 2. Ask the assistant a question about JSON configuration (e.g., "how do I configure opencode.json?") 3. Observe the JSON code blocks in the response **Expected Behavior:** JSON code blocks should display with proper quotation marks around keys and values: ```json { "key": "value" } ``` **Actual Behavior:** JSON code blocks display without quotation marks: ```json { key: value } ``` **Additional Context:** - Quotation marks appear correctly in regular text and bullet lists - The issue only affects code blocks (specifically JSON, but may affect other languages) - This makes it impossible to show valid JSON syntax to users - The assistant's response likely contains the quotes, but the TUI markdown renderer strips them during display **Impact:** - High - Makes it difficult to provide accurate JSON configuration examples - Users may copy invalid JSON syntax - Creates confusion about proper JSON formatting
yindo added the windowsopentui labels 2026-02-16 17:51:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#5326