[PR #322] [CLOSED] fix: only slash-escape HTML tag angle brackets outside of code sections #9587

Closed
opened 2026-02-16 18:13:48 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/322
Author: @markjaquith
Created: 6/23/2025
Status: Closed

Base: devHead: issue/320/fix-slashed-html-tags


📝 Commits (3)

  • 363db7b Only slash-escape HTML tag angle brackets outside of code blocks
  • ab45d39 Refactor and keep only the more helpful comments
  • 0e5279d Merge branch 'dev' into issue/320/fix-slashed-html-tags

📊 Changes

2 files changed (+215 additions, -0 deletions)

View changed files

📝 packages/tui/internal/components/chat/message.go (+57 -0)
packages/tui/internal/components/chat/message_test.go (+158 -0)

📄 Description

fixes #320

Added unit tests because this is the kind of twitchy text-parsing that really benefits from it.

What I don't know is if there is a better library to use that can do the "are we in a code block" parsing in a definitely-spec-compliant way. This way is pretty brute force and naive.


🔄 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/opencode/pull/322 **Author:** [@markjaquith](https://github.com/markjaquith) **Created:** 6/23/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `issue/320/fix-slashed-html-tags` --- ### 📝 Commits (3) - [`363db7b`](https://github.com/anomalyco/opencode/commit/363db7ba4cf90d0e39a5cf22b0a4a2652bbdaae3) Only slash-escape HTML tag angle brackets outside of code blocks - [`ab45d39`](https://github.com/anomalyco/opencode/commit/ab45d3917310d6c9e037e4613b13b9ebbd9cf7fb) Refactor and keep only the more helpful comments - [`0e5279d`](https://github.com/anomalyco/opencode/commit/0e5279d7f9745f4f638e9dc64bb109d001252f05) Merge branch 'dev' into issue/320/fix-slashed-html-tags ### 📊 Changes **2 files changed** (+215 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/chat/message.go` (+57 -0) ➕ `packages/tui/internal/components/chat/message_test.go` (+158 -0) </details> ### 📄 Description fixes #320 Added unit tests because this is the kind of twitchy text-parsing that really benefits from it. What I don't know is if there is a better library to use that can do the "are we in a code block" parsing in a definitely-spec-compliant way. This way is pretty brute force and naive. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:13:48 -05:00
yindo closed this issue 2026-02-16 18:13:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9587