tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaks
Maintainer thường phản hồi trong vòng 1 ngày
@argszero đang làm issue này rồi.
Từ ngày 27/11/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 82/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 228k
- Fork
- 31k
- Merge trung bình
- 5 giờ 19 phút
- Pull request đã merge (30 ngày)
- 457
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của anomalyco/opencode
-
area/sdk-api platform/linux type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anomalyco/opencode#66604 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/tui platform/linux type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#66585 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
console: Go vs Go Plus comparison bars on /console/go understate 4x limits due to log scalingĐang mởarea/web inference/go reproduced type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
anomalyco/opencode#66475 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[FEATURE]: More colorful built-in Dracula theme for the desktop appCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởarea/desktop type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#66446 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
scripts: path comparisons break on Windows (check-greys fails the pre-push hook, upgrade-opentui skips nothing)Có thể đã có người làm @deosiree đã nhận 2 ngày trước. Đang mởplatform/windows status/repro-plausible type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
anomalyco/opencode#66192 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
knaw-huc/textannoviz#742 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
cloudflare/realtimekit-ui#219 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
mermaid-js/mermaid-v13#1370 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:docs area:plugins bug documentation low-priority platform:windows
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
anthropics/claude-code#112676 ·