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>");
|
messageText = messageText.replace(new RegExp("\r?\n", "g"), "<br>");
|
||||||
|
|
||||||
var spaceRegex = /\s{2,}/g;
|
// var spaceRegex = /\s{2,}/g;
|
||||||
function spaceReplacer(match, p1, offset, string) {
|
// function spaceReplacer(match, p1, offset, string) {
|
||||||
var replaceString = "";
|
// var replaceString = "";
|
||||||
for (var i = 0; i < match.length; i++) {
|
// for (var i = 0; i < match.length; i++) {
|
||||||
replaceString += " ";
|
// replaceString += " ";
|
||||||
}
|
// }
|
||||||
return replaceString;
|
// return replaceString;
|
||||||
}
|
// }
|
||||||
messageText = messageText.replace(spaceRegex, spaceReplacer);
|
// messageText = messageText.replace(spaceRegex, spaceReplacer);
|
||||||
|
|
||||||
return messageText;
|
return messageText;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue