Skip to content

Commit 311e92d

Browse files
committed
fix(MidEllipsis): It should not trim strings
1 parent 5990ed9 commit 311e92d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

react/MidEllipsis/index.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ const MidEllipsis = forwardRef(
2525
const str = text || children
2626

2727
const partLength = Math.round(str.length / 2)
28-
const firstPart = str.substring(0, partLength).trim()
29-
const lastPart = str.substring(partLength, str.length).trim()
28+
const firstPart = str.substring(0, partLength)
29+
const lastPart = str.substring(partLength, str.length)
3030

3131
return (
3232
<div className={cx('u-midellipsis', className)} ref={ref} {...props}>

0 commit comments

Comments
 (0)