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 = [];