Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cocos/2d/components/rich-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
THE SOFTWARE.
*/

import { ccclass, requireComponent, executeInEditMode, executionOrder, help, menu, multiline, type, displayOrder, serializable, editable } from 'cc.decorator';

Check warning on line 26 in cocos/2d/components/rich-text.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

This line has a length of 159. Maximum allowed is 150
import { DEBUG, DEV, EDITOR } from 'internal:constants';
import { Font, SpriteAtlas, TTFFont, SpriteFrame } from '../assets';
import { EventTouch } from '../../input/types';
Expand Down Expand Up @@ -617,8 +617,9 @@
if (_tempSize.x < 2048) {
partStringArr.push(multilineTexts[i]);
} else {
const thisPartSplitResultArr = this.splitLongStringOver2048(multilineTexts[i], styleIndex);
partStringArr.push(...thisPartSplitResultArr);
// _updateRichTextWithMaxWidth function will correct the text again.
partStringArr.push(text);
return partStringArr;
Copy link
Contributor

Choose a reason for hiding this comment

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

What about the rest of the multilineTexts? Some texts are skipped.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have corrected this situation.

}
}
}
Expand Down
Loading