From 48369602f56913bb5d69fe5048eaab5a61f3835f Mon Sep 17 00:00:00 2001 From: w-e-w <40751091+w-e-w@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:27:54 +0900 Subject: [PATCH] fix passing literal brackets --- .../prompt-bracket-checker/javascript/prompt-bracket-checker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js b/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js index 114cf94ccbf..f1f42fe7f0a 100644 --- a/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js +++ b/extensions-builtin/prompt-bracket-checker/javascript/prompt-bracket-checker.js @@ -5,7 +5,7 @@ function checkBrackets(textArea, counterElt) { var counts = {}; - (textArea.value.match(/[(){}[\]]/g) || []).forEach(bracket => { + (textArea.value.match(/(? { counts[bracket] = (counts[bracket] || 0) + 1; }); var errors = [];