space to _ for prompt inputs
This commit is contained in:
parent
18f664a5a0
commit
ea89778e50
|
|
@ -85,20 +85,22 @@ elements.generator_prompt = {
|
||||||
};
|
};
|
||||||
|
|
||||||
function parseForLateGenerationParameter(input) {
|
function parseForLateGenerationParameter(input) {
|
||||||
if(typeof(input) === "string") { //it should be an array, so string check
|
if(typeof(input) === "string") { //it should be an array, so string check
|
||||||
//console.log("String detected");
|
input = input.replace(/ /g,"_");
|
||||||
if(input.includes(",")) { //comma-separated string?
|
//console.log("String detected");
|
||||||
//console.log("Splitting string to array");
|
if(input.includes(",")) { //comma-separated string?
|
||||||
input = input.split(","); //,SS to array
|
//console.log("Splitting string to array");
|
||||||
} else {
|
input = input.split(","); //,SS to array
|
||||||
//console.log("Wrapping string in array");
|
} else {
|
||||||
input = [input]; //single string to array
|
//console.log("Wrapping string in array");
|
||||||
};
|
input = [input]; //single string to array
|
||||||
};
|
};
|
||||||
for(i = 0; i < input.length; i++) {
|
};
|
||||||
if(input[i].includes("+")) {
|
for(i = 0; i < input.length; i++) {
|
||||||
input[i] = input[i].split("+")
|
input[i] = input[i].replace(/ /g,"_");
|
||||||
};
|
if(input[i].includes("+")) {
|
||||||
};
|
input[i] = input[i].split("+")
|
||||||
return input;
|
};
|
||||||
|
};
|
||||||
|
return input;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue