Problem/Motivation
In https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co... L300 there is a spelling error in a comment which refers to $add_ellipses - the correct variable to reference should be $add_ellipsis.
* @param int $min_wordsafe_length
* If $wordsafe is TRUE, the minimum acceptable length for truncation (before
* adding an ellipsis, if $add_ellipsis is TRUE). Has no effect if $wordsafe
* is FALSE. This can be used to prevent having a very short resulting string
* that will not be understandable. For instance, if you are truncating the
* string "See myverylongurlexample.com for more information" to a word-safe
* return length of 20, the only available word boundary within 20 characters
* is after the word "See", which wouldn't leave a very informative string. If
* you had set $min_wordsafe_length to 10, though, the function would realise
* that "See" alone is too short, and would then just truncate ignoring word
* boundaries, giving you "See myverylongurl..." (assuming you had set
* $add_ellipses to TRUE).
Proposed resolution
Change $add_ellipses to $add_ellipsis
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3368664-2.patch | 608 bytes | _pratik_ |
Issue fork drupal-3368664
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
_pratik_Comment #3
cilefen commentedComment #4
longwavePatch appears to be rolled from the wrong directory.
Comment #7
rpayanmPlease review.
Comment #8
smustgrave commentedReroll was good
Comment #9
quietone commentedWhile add_ellipses is a word it is not the name of the variable. The variable uses the singular form.
Comment #12
quietone commentedCommitted/pushed to 11.x and cherry-picked to 10.1.x, thanks!