|
|
@ -458,11 +458,10 @@
|
|
|
|
const nbsp = '\xa0';
|
|
|
|
const nbsp = '\xa0';
|
|
|
|
const regex = /(\S)( +)(\S+\s*)$/;
|
|
|
|
const regex = /(\S)( +)(\S+\s*)$/;
|
|
|
|
return text.replace(regex, (match, start, spaces, end) => {
|
|
|
|
return text.replace(regex, (match, start, spaces, end) => {
|
|
|
|
const newSpaces = _.reduce(
|
|
|
|
const newSpaces =
|
|
|
|
spaces,
|
|
|
|
end.length < 12
|
|
|
|
accumulator => accumulator + nbsp,
|
|
|
|
? _.reduce(spaces, accumulator => accumulator + nbsp, '')
|
|
|
|
''
|
|
|
|
: spaces;
|
|
|
|
);
|
|
|
|
|
|
|
|
return `${start}${newSpaces}${end}`;
|
|
|
|
return `${start}${newSpaces}${end}`;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|