Get rid of any extra whitespace in break string

This commit is contained in:
nathangray 2021-05-10 15:38:07 -06:00
parent a94345bbed
commit b4b38d54ff
2 changed files with 2 additions and 2 deletions

View File

@ -1160,7 +1160,7 @@ var et2_link = /** @class */ (function (_super) {
// Set up title to optionally break on the provided character - replace all space with nbsp, add a // Set up title to optionally break on the provided character - replace all space with nbsp, add a
// zero-width space after the break string // zero-width space after the break string
_value = _value _value = _value
.replace(this.options.break_title, this.options.break_title + "\u200B") .replace(this.options.break_title, this.options.break_title.trimEnd() + "\u200B")
.replace(/ /g, '\u00a0'); .replace(/ /g, '\u00a0');
} }
jQuery(node).text(_value + ""); jQuery(node).text(_value + "");

View File

@ -1465,7 +1465,7 @@ export class et2_link extends et2_valueWidget implements et2_IDetachedDOM
// Set up title to optionally break on the provided character - replace all space with nbsp, add a // Set up title to optionally break on the provided character - replace all space with nbsp, add a
// zero-width space after the break string // zero-width space after the break string
_value = _value _value = _value
.replace(this.options.break_title, this.options.break_title+"\u200B") .replace(this.options.break_title, this.options.break_title.trimEnd()+"\u200B")
.replace(/ /g, '\u00a0'); .replace(/ /g, '\u00a0');
} }
jQuery(node).text(_value+""); jQuery(node).text(_value+"");