mirror of
https://github.com/ahmadawais/terminui.git
synced 2026-04-26 17:36:13 +03:00
[PR #3] Add emoji-aware wide character detection; replace ▶ with ❯ in demos #4
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/terminui#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ahmadawais/terminui/pull/3
Author: @Copilot
Created: 3/4/2026
Status: 🔄 Open
Base:
main← Head:copilot/change-highlight-symbol-in-demo📝 Commits (4)
44b3746Initial plan3fbb46cfix: replace ▶ with ❯ in demo highlightSymbol for consistent widthb470311feat: add emoji-aware wide character detection to library58b166bchore: remove accidental package-lock.json, add inline comments for key symbols📊 Changes
8 files changed (+124 additions, -42 deletions)
View changed files
📝
README.md(+2 -2)📝
examples/jsx-dashboard.tsx(+1 -1)📝
examples/kitchen-sink.ts(+1 -1)📝
examples/primary-screen.ts(+1 -1)📝
src/__tests__/core.test.ts(+31 -0)📝
src/core/buffer.ts(+3 -17)➕
src/core/charwidth.ts(+84 -0)📝
src/core/text.ts(+1 -20)📄 Description
▶(U+25B6) renders as 2 cells wide in many terminal fonts, butisWideCharreturnedfalsefor it — causing layout corruption. The library's width detection only covered CJK/Hangul/Fullwidth ranges, missing emoji presentation characters entirely.Library: emoji-aware
isWideCharsrc/core/charwidth.ts— shared module with comprehensive wide character detection covering:Emoji_Presentation=Yes(⌚☔✅✨❤ etc.)▶(U+25B6),◀(U+25C0)text.ts/buffer.tsnow import from the shared module, eliminating the duplicated range definitionsDemos & README
highlightSymbol: '▶ '→'❯ 'across all examples and READMEOriginal prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.