1
1
mirror of https://gitlab.com/ceda_ei/Quadnite-Bot synced 2025-04-02 19:06:51 +02:00

Add /g to replace multiple spaces.

This commit is contained in:
Ceda EI 2020-04-23 20:33:48 +05:30
parent af56ffbbb3
commit 53dda834f9

View File

@ -22,7 +22,7 @@ function expand(words, text) {
const word = wordsWithLetter[Math.floor(Math.random() * wordsWithLetter.length)];
return word;
}).reduce((acc, cur) => acc + " " + cur).replace(/\s{2,}/, " ");
}).reduce((acc, cur) => acc + " " + cur).replace(/\s{2,}/g, " ");
}