anuraghazra / anuraghazra/github-readme-stats
Description text overflow & wrapping logic issues with mixed CJK/Latin characters
- Dominant language
- JavaScript
- Stars
- 79.8k
- Forks
- 37.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
The current text wrapping logic in src/common/fmt.js is flawed for CJK (Chinese/Japanese/Korean) and mixed content:
- Incorrect Split Logic: It aggressively splits text using the full-width comma (,) as a delimiter. This causes the comma to disappear and forces line breaks at incorrect positions.
- No Wrapping for Long Sentences: Long Chinese sentences without commas are not wrapped at all, causing them to overflow the card width.
- Mixed Content Overflow: The current width calculation does not properly handle the visual difference between full-width (CJK) and half-width (English) characters, leading to text overflowing the card borders.
### Expected behavior
The description text should wrap automatically based on visual width (pixel estimation) rather than specific punctuation, and should correctly handle mixed CJK/English content without overflowing.
### Screenshots / Live demo link


### Additional context
_No response_
Contributor guide
Research direction
Start by reading the wrapping and width-calculation logic in src/common/fmt.js, then reproduce the reported cases with long CJK text, full-width commas, and mixed CJK/Latin content using the linked examples. Done means punctuation is preserved, long sentences wrap, and mixed-content descriptions stay within the card borders.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100