Fix display of original string length in debug output for ellipsize()
This commit is contained in:
parent
370e2cc6e7
commit
a41e610e6c
1 changed files with 2 additions and 1 deletions
|
@ -883,6 +883,7 @@ Zotero.Utilities = {
|
|||
if (str.length <= len) {
|
||||
return str;
|
||||
}
|
||||
var origLen = str.length;
|
||||
let radius = Math.min(len, 5);
|
||||
if (wordBoundary) {
|
||||
let min = len - radius;
|
||||
|
@ -896,7 +897,7 @@ Zotero.Utilities = {
|
|||
else {
|
||||
str = str.substr(0, len)
|
||||
}
|
||||
return str + '\u2026' + (countChars ? ' (' + str.length + ' chars)' : '');
|
||||
return str + '\u2026' + (countChars ? ' (' + origLen + ' chars)' : '');
|
||||
},
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue