tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaks
Maintainers usually reply within 1 day
@argszero is already working on this.
Since Nov 27, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- cli
Research direction
Start in packages/merman/src/core/text-lines.ts and read parseDiagramTextLines, which currently splits on <br> tags and parses italic tags. Trace how Mermaid node labels reach this parser, then check the TUI rendering tests for text lines. Done when bold tags are handled and \n creates separate lines in the rendered labels.
Written by the indexing model from the issue text.
Description
Description
In the TUI Mermaid renderer (packages/merman), HTML bold tags (<b>, <strong>) inside node labels are rendered literally instead of being formatted as bold (or stripped), and \n line breaks are not split into multiple lines.
Looking at packages/merman/src/core/text-lines.ts, parseDiagramTextLines only splits lines on <br>/<br/> and only parses <i>/<em> tags:
export function parseDiagramTextLines(value: string): DiagramTextLine[] {
return value.split(/<br\s*\/?>/i).map((line) => {
const runs: DiagramTextRun[] = []
const source = line.trim()
const tag = /<\/?(?:i|em)\s*>/gi
Plugins
None
OpenCode version
v2.1.2
Steps to reproduce
- Render a Mermaid flowchart in the TUI containing
<b>/<strong>tags and\nline breaks in node labels:
```mermaid
flowchart TD
A["<b>Service A</b>\nLine 2"] --> B["<strong>Service B</strong><br/>Line 2"]
```
- Observe that
<b>Service A</b>and<strong>Service B</strong>are displayed with literal HTML tags and\ndoes not break the line.
Screenshot
N/A
Operating System
Linux (WSL2 - 6.18.33.2-microsoft-standard-WSL2)
Terminal
herdr
- Dominant language
- TypeScript
- Stars
- 228k
- Forks
- 31k
- Avg merge
- 5h 19m
- Merged PRs (30d)
- 457
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anomalyco/opencode
-
area/sdk-api platform/linux type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/opencode#66604 · 1 comment ·
Maintainers usually reply within 1 day
-
area/tui platform/linux type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anomalyco/opencode#66585 · 1 comment ·
Maintainers usually reply within 1 day
-
area/web inference/go reproduced type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
anomalyco/opencode#66475 · 1 comment ·
Maintainers usually reply within 1 day
-
[FEATURE]: More colorful built-in Dracula theme for the desktop appMay be free again A pull request for this issue was closed without being merged. Openarea/desktop type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
anomalyco/opencode#66446 · 1 comment ·
Maintainers usually reply within 1 day
-
scripts: path comparisons break on Windows (check-greys fails the pre-push hook, upgrade-opentui skips nothing)Possibly taken @deosiree claimed this 2 days ago. Openplatform/windows status/repro-plausible type/bug version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/opencode#66192 · 2 comments ·
Maintainers usually reply within 1 day
All issues in anomalyco/opencode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
knaw-huc/textannoviz#742 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
cloudflare/realtimekit-ui#219 ·
Maintainers usually reply within 1 day
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
mermaid-js/mermaid-v13#1370 ·
Maintainers usually reply within 1 day
-
area:docs area:plugins bug documentation low-priority platform:windows
Difficulty 1/5 Under an hour Newbie friendliness 84/100
anthropics/claude-code#112676 ·