Skip to content

feat: fix emoji truncation issue about Ellipsis#324

Merged
tangshumin666 merged 4 commits into
mainfrom
feat-ellipsis-emoji-tsm
May 15, 2025
Merged

feat: fix emoji truncation issue about Ellipsis#324
tangshumin666 merged 4 commits into
mainfrom
feat-ellipsis-emoji-tsm

Conversation

@tangshumin666

Copy link
Copy Markdown
Collaborator

No description provided.

@tangshumin666 tangshumin666 changed the title fix: fix emoji truncation issue abute feat: fix emoji truncation issue about Ellipsis May 14, 2025
@adaex adaex requested a review from Copilot May 15, 2025 02:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses an emoji truncation issue by updating the logic in the Ellipsis component to remove orphan high-surrogate characters that may result in incomplete emoji rendering.

  • Adjusts text trimming to target incomplete surrogate pairs.
  • Enhances comment clarity regarding emoji handling.
Comments suppressed due to low confidence (1)

packages/arcodesign/components/ellipsis/components/js-ellipsis.tsx:71

  • Consider updating the comment above this line to clarify that the regex removes only orphaned high-surrogate characters (indicative of incomplete emoji) rather than implying it removes any emoji character.
currentText = currentText.replace(/[�-�]+$/, '');

@tangshumin666 tangshumin666 merged commit 372d5fc into main May 15, 2025
4 checks passed
@tangshumin666 tangshumin666 deleted the feat-ellipsis-emoji-tsm branch May 15, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants