Merge pull request #2899

abbe042 Filter out multiple blanks in seed input when counting words (rbrunner7)
pull/7/head
luigi1111 4 years ago
commit c82bd94bc3
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

@ -97,10 +97,6 @@ function tr(text) {
return qsTr(text) + translationManager.emptyString
}
function lineBreaksToSpaces(text) {
return text.trim().replace(/(\r\n|\n|\r)/gm, " ");
}
function usefulName(path) {
// arbitrary "short enough" limit
if (path.length < 32)
@ -110,7 +106,7 @@ function usefulName(path) {
function checkSeed(seed) {
console.log("Checking seed")
var wordsArray = lineBreaksToSpaces(seed).split(" ");
var wordsArray = seed.split(/\s+/);
return wordsArray.length === 25 || wordsArray.length === 24
}