diff --git a/ui/plugins/ui/lora-prompt-parser.plugin.js b/ui/plugins/ui/lora-prompt-parser.plugin.js index 0510b47f..98a6467b 100644 --- a/ui/plugins/ui/lora-prompt-parser.plugin.js +++ b/ui/plugins/ui/lora-prompt-parser.plugin.js @@ -82,7 +82,9 @@ } // Clean up the prompt string, e.g. from "apple, banana, , orange, , pear , " to "apple, banana, orange, pear" - let cleanedPrompt = prompt.replace(regex, '').replace(/(\s*,\s*(?=\s*,|$))|(^\s*,\s*)|\s+/g, ' ').trim(); + // let cleanedPrompt = prompt.replace(regex, '').replace(/(\s*,\s*(?=\s*,|$))|(^\s*,\s*)|\s+/g, ' ').trim(); + // This line keeps /n in prompts. Good if you want to make prompt with multiple sub-prompts. Previous line would merge sub-prompts into one big prompt + let cleanedPrompt = prompt.replace(regex, '').trim(); //console.log('Matches: ' + JSON.stringify(matches)); // Return the array of matches and cleaned prompt string