Fix umi list not resetting after deleting chars behind "["

This commit is contained in:
DominikDoom
2023-10-01 23:47:02 +02:00
parent b3e71e840d
commit 446ac14e7f

View File

@@ -129,7 +129,7 @@ class UmiParser extends BaseTagParser {
return;
}
let umiTagword = diff[0] || '';
let umiTagword = tagCountChange < 0 ? '' : diff[0] || '';
let tempResults = [];
if (umiTagword && umiTagword.length > 0) {
umiTagword = umiTagword.toLowerCase().replace(/[\n\r]/g, "");
@@ -188,7 +188,7 @@ class UmiParser extends BaseTagParser {
}
}
function updateUmiTags( tagType, sanitizedText, newPrompt, textArea) {
function updateUmiTags(tagType, sanitizedText, newPrompt, textArea) {
// If it was a umi wildcard, also update the umiPreviousTags
if (tagType === ResultType.umiWildcard && originalTagword.length > 0) {
let umiSubPrompts = [...newPrompt.matchAll(UMI_PROMPT_REGEX)];