Skip to content

Commit def42ec

Browse files
committed
feat: fix emoji truncation issue abute Ellipsis
1 parent 47cd922 commit def42ec

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const JsEllipsis = forwardRef((props: JsEllipsisProps, ref: Ref<JsEllipsisRef>)
6868
}
6969
}
7070
// Remove the last character if it has a emoji character.
71-
currentText = currentText.replace(/[\uD800-\uDBFF]+$/g, '');
71+
currentText = currentText.replace(/[\uD800-\uDBFF]+$/, '');
7272
// Remove the exclude char at the end of the content.
7373
while (endExcludes && endExcludes.includes(currentText[currentText.length - 1])) {
7474
currentText = currentText.slice(0, -1);

0 commit comments

Comments
 (0)