[GH-ISSUE #799] [Bug] Markdown CJK wrap duplicates glyph at specific widths #988

Open
opened 2026-03-14 09:12:19 +03:00 by kerem · 0 comments
Owner

Originally created by @stephanoskomnenos on GitHub (Mar 10, 2026).
Original GitHub issue: https://github.com/anomalyco/opentui/issues/799

Summary

Rendering Markdown with CJK content can duplicate a fullwidth glyph at specific terminal widths where the line wraps.

Repro

Repo: https://github.com/stephanoskomnenos/opentui-md-wrap-demo

Commands:

  • scripts/capture.sh --tmux-columns 38 --out-png ./tmp/demo-38.png
  • scripts/capture.sh --tmux-columns 39 --out-png ./tmp/demo-39.png
  • scripts/capture.sh --tmux-columns 40 --out-png ./tmp/demo-40.png

Expected

No duplicated glyph on wrap.

Actual

At width 39, the wrap boundary duplicates a CJK glyph ("确" appears both at end of line and again on next line).

Screenshots (38/39/40)

38
39
40

ANSI/HTML/PNG are included in the repo under tmp/.

Environment (devcontainer)

  • @opentui/core: 0.1.87
  • @opentui/react: 0.1.87
  • Bun runtime (Linux)
  • Rendering via <markdown> component
Originally created by @stephanoskomnenos on GitHub (Mar 10, 2026). Original GitHub issue: https://github.com/anomalyco/opentui/issues/799 ## Summary Rendering Markdown with CJK content can duplicate a fullwidth glyph at specific terminal widths where the line wraps. ## Repro Repo: https://github.com/stephanoskomnenos/opentui-md-wrap-demo Commands: - `scripts/capture.sh --tmux-columns 38 --out-png ./tmp/demo-38.png` - `scripts/capture.sh --tmux-columns 39 --out-png ./tmp/demo-39.png` - `scripts/capture.sh --tmux-columns 40 --out-png ./tmp/demo-40.png` ## Expected No duplicated glyph on wrap. ## Actual At width 39, the wrap boundary duplicates a CJK glyph ("确" appears both at end of line and again on next line). ## Screenshots (38/39/40) ![38](https://raw.githubusercontent.com/stephanoskomnenos/opentui-md-wrap-demo/main/tmp/demo-38.png) ![39](https://raw.githubusercontent.com/stephanoskomnenos/opentui-md-wrap-demo/main/tmp/demo-39.png) ![40](https://raw.githubusercontent.com/stephanoskomnenos/opentui-md-wrap-demo/main/tmp/demo-40.png) ANSI/HTML/PNG are included in the repo under `tmp/`. ## Environment (devcontainer) - @opentui/core: 0.1.87 - @opentui/react: 0.1.87 - Bun runtime (Linux) - Rendering via `<markdown>` component
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/opentui#988
No description provided.