From ded59f14f757ff8c8817a61d9297d80cc9d99d18 Mon Sep 17 00:00:00 2001 From: mic Date: Wed, 11 Feb 2026 22:47:41 +0100 Subject: [PATCH] checkPromptsConfigForPlaceholders updated. see #525 #554 --- pages/customprompts/mzta-custom-prompts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/customprompts/mzta-custom-prompts.js b/pages/customprompts/mzta-custom-prompts.js index 55824f0d..8e45ac8c 100644 --- a/pages/customprompts/mzta-custom-prompts.js +++ b/pages/customprompts/mzta-custom-prompts.js @@ -1417,7 +1417,7 @@ async function checkPromptsConfigForPlaceholders(textarea){ // check additional_text and selected_text placeholders presence and the corrispondent checkboxes let tr_ancestor = textarea.closest('tr'); let need_custom_text_element = tr_ancestor.querySelector('.need_custom_text') || tr_ancestor.querySelector('.need_custom_text_new'); - if(String(curr_text).indexOf('{%additional_text%}') != -1){ + if(/{%\s*additional_text(?::.*?)?\s*%}/.test(String(curr_text))){ if(!need_custom_text_element.checked){ need_custom_text_element.closest('.need_custom_text_span').style.border = '2px solid red'; }else{