mirror of
https://github.com/misiektoja/spotify_profile_monitor.git
synced 2026-04-25 23:15:57 +03:00
[PR #24] [MERGED] Fix truncation code to handle emojis with a actual width greater than one character. Example: 🎧 #31
Labels
No labels
Stale
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify_profile_monitor#31
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/misiektoja/spotify_profile_monitor/pull/24
Author: @tomballgithub
Created: 7/8/2025
Status: ✅ Merged
Merged: 7/10/2025
Merged by: @misiektoja
Base:
dev← Head:truncate_fix📝 Commits (2)
a4377ccFix truncation code to handle emojis with a actual width greater than one character. Example: 🎧583366bInstantiate wcwidth📊 Changes
2 files changed (+17 additions, -4 deletions)
View changed files
📝
requirements.txt(+1 -0)📝
spotify_profile_monitor.py(+16 -4)📄 Description
I noticed today that the truncation code doesn't cover the case when some emojis take up two character positions (they are double-wide). An example is the following, which was in the title of a playlist in my log: 🎧
This code does a character-by-character analysis and accounts for this.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.