From db6dcc95689f72e94acfa8a6e4f1765a54092637 Mon Sep 17 00:00:00 2001 From: sgmklp <2394501736@qq.com> Date: Sat, 15 Oct 2022 22:57:04 +0800 Subject: [PATCH] Make the tranlation in csv adding to result, also support Tag without tranlation. --- javascript/tagAutocomplete.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index a484149..3eed218 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -234,10 +234,10 @@ function insertTextAtCursor(textArea, result, tagword) { if (acConfig.escapeParentheses) { sanitizedText = sanitizedText - .replaceAll("(", "\\(") - .replaceAll(")", "\\)") - .replaceAll("[", "\\[") - .replaceAll("]", "\\]"); + .replaceAll("(", "\\(") + .replaceAll(")", "\\)") + .replaceAll("[", "\\[") + .replaceAll("]", "\\]"); } var prompt = textArea.value; @@ -303,6 +303,9 @@ function addResultsToList(textArea, results, tagword) { let result = results[i]; let li = document.createElement("li"); li.textContent = result[0]; + if (result[2]) { + li.textContent += " >> " + result[2]; + } // Wildcards & Embeds have no tag type if (!result[1].startsWith("wildcard") && result[1] !== "embedding") {