don't insert ­ before whitespace
This commit is contained in:
parent
c23e192b7a
commit
510ae91ac0
|
@ -194,5 +194,5 @@ function tDocLoader() {
|
||||||
function tWordBreak(text) {
|
function tWordBreak(text) {
|
||||||
// adds soft hyphens every 10 characters to ensure the long words break before breaking the layout
|
// adds soft hyphens every 10 characters to ensure the long words break before breaking the layout
|
||||||
return text.length <= 10 ? text :
|
return text.length <= 10 ? text :
|
||||||
text.replace(/([\d\w\u007B-\uFFFF]{10}|[\d\w\u007B-\uFFFF]{5,10}[!-/]|((?!\s)\W){10})(?!\b)/g, '$&\u00AD');
|
text.replace(/([\d\w\u007B-\uFFFF]{10}|[\d\w\u007B-\uFFFF]{5,10}[!-/]|((?!\s)\W){10})(?!\b|\s)/g, '$&\u00AD');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user