Skip to content

Commit

Permalink
fix prompt-bracket-checker miscounting of literal tokens (#16669)
Browse files Browse the repository at this point in the history
  • Loading branch information
w-e-w authored Nov 20, 2024
1 parent 957888a commit cd869bb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

function checkBrackets(textArea, counterElt) {
var counts = {};
(textArea.value.match(/[(){}[\]]/g) || []).forEach(bracket => {
(textArea.value.match(/(?<!\\)[(){}[\]]/g) || []).forEach(bracket => {
counts[bracket] = (counts[bracket] || 0) + 1;
});
var errors = [];
Expand Down

0 comments on commit cd869bb

Please sign in to comment.