Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug #37054 [String] Fix ellipsis of truncate when not using cut optio…
…n (DuboisS) This PR was merged into the 5.1 branch. Discussion ---------- [String] Fix ellipsis of truncate when not using cut option | Q | A | ------------- | --- | Branch? | 5.1 <!-- see below --> | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | - <!-- prefix each issue number with "Fix #", if any --> | License | MIT | Doc PR | - <!-- required for new features --> [Since 5.1](https://symfony.com/blog/new-in-symfony-5-1-string-improvements#keep-the-last-word-when-truncating), we can use a cut option on truncate. But with this option, we don't have the expected behavior when the entire chain is returned. Currently: `u('Lorem Ipsum')->truncate(8, '…', false); // 'Lorem Ipsum...'` Instead of: `u('Lorem Ipsum')->truncate(8, '…', false); // 'Lorem Ipsum'` Thanks to @jmsche for his help. Commits ------- a2ee6c6 [String] Fix ellipsis of truncate when not using cut option
- Loading branch information