Skip to content

fix(tui): rendering of colors in Markdown diff blocks - #46480

Closed
AndreasHolt wants to merge 1 commit into
anomalyco:v2from
AndreasHolt:fix-markdown-diffs
Closed

AndreasHolt wants to merge 1 commit into
anomalyco:v2from
AndreasHolt:fix-markdown-diffs

Conversation

@AndreasHolt

@AndreasHolt AndreasHolt commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #46475

Type of change

  • Bug fix

What does this PR do?

Fixes missing colors in Markdown diff blocks.

Diff blocks appear without colors because OpenCode downloads highlighting rules that are too new for its diff parser. This change uses the rules from the same v0.1.0 release as the parser, which then fixes colors for added and removed lines as seen below.

This fix downloads the highlighting rules from the same v0.1.0 release as the parser

How did you verify your code works?

I reproduced the failure with the existing parser and query, then tested the v0.1.0 query with OpenTUI's Markdown renderer.

Screenshots

Before After
Diff blocks without colors Diff blocks with colors

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels Aug 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@opencode-agent

opencode-agent Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for identifying and fixing this. We merged #46518, which incorporates the fix while pinning the highlighting query to the immutable upstream commit SHA. You are credited as a co-author there, so I’m closing this PR in favor of the merged version.

@opencode-agent opencode-agent Bot closed this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant