space to _ for prompt inputs

This commit is contained in:
Laetitia (O-01-67) 2022-12-12 11:01:13 -05:00 committed by GitHub
parent 18f664a5a0
commit ea89778e50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 16 deletions

View File

@ -85,20 +85,22 @@ elements.generator_prompt = {
};
function parseForLateGenerationParameter(input) {
if(typeof(input) === "string") { //it should be an array, so string check
//console.log("String detected");
if(input.includes(",")) { //comma-separated string?
//console.log("Splitting string to array");
input = input.split(","); //,SS to array
} else {
//console.log("Wrapping string in array");
input = [input]; //single string to array
};
};
for(i = 0; i < input.length; i++) {
if(input[i].includes("+")) {
input[i] = input[i].split("+")
};
};
return input;
if(typeof(input) === "string") { //it should be an array, so string check
input = input.replace(/ /g,"_");
//console.log("String detected");
if(input.includes(",")) { //comma-separated string?
//console.log("Splitting string to array");
input = input.split(","); //,SS to array
} else {
//console.log("Wrapping string in array");
input = [input]; //single string to array
};
};
for(i = 0; i < input.length; i++) {
input[i] = input[i].replace(/ /g,"_");
if(input[i].includes("+")) {
input[i] = input[i].split("+")
};
};
return input;
};