Disabling space replacer for now - a performance nightmare with (probably) small benefit
This commit is contained in:
parent
6666cf494a
commit
6f9a0a672a
1 changed files with 9 additions and 9 deletions
|
@ -298,15 +298,15 @@ function enhanceMessageText(formattedText) {
|
|||
|
||||
messageText = messageText.replace(new RegExp("\r?\n", "g"), "<br>");
|
||||
|
||||
var spaceRegex = /\s{2,}/g;
|
||||
function spaceReplacer(match, p1, offset, string) {
|
||||
var replaceString = "";
|
||||
for (var i = 0; i < match.length; i++) {
|
||||
replaceString += " ";
|
||||
}
|
||||
return replaceString;
|
||||
}
|
||||
messageText = messageText.replace(spaceRegex, spaceReplacer);
|
||||
// var spaceRegex = /\s{2,}/g;
|
||||
// function spaceReplacer(match, p1, offset, string) {
|
||||
// var replaceString = "";
|
||||
// for (var i = 0; i < match.length; i++) {
|
||||
// replaceString += " ";
|
||||
// }
|
||||
// return replaceString;
|
||||
// }
|
||||
// messageText = messageText.replace(spaceRegex, spaceReplacer);
|
||||
|
||||
return messageText;
|
||||
|
||||
|
|
Loading…
Reference in a new issue