Task #92505
closedFix example for format.crop
100%
Description
Has this (first) example:
<f:format.crop maxCharacters="10">
This is some very long text
</f:format.crop>
This is not a good example because it does not explain how it crops. You are left wondering if it counts the whitespace. Or why else the result is "This is" and not "This is so" (for maxCharacters="10").
Lower down on the page you see the respectWordBoundaries.
So it counts the whitespace and it stops if an entire word does not fit.
If the indenting style is changed, the output changes too. In any case, the whitespace makes it unnecessarily confusing.
Alternatively, it might be good to point out that whitespace is not trimmed away.
Maybe change it to this:
<f:format.crop maxCharacters="10">This is some very long text</f:format.crop>
Add the information about word boundary to first example.
And add a tip how to trim the whitespace.
Updated by Gerrit Code Review over 3 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66155
Updated by Gerrit Code Review over 3 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66155
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/66127
Updated by Sybille Peters over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 68b351758b9ccba2041e3df725e17c3947bf9fa4.