Skip to content

Commit

Permalink
fix prompt-bracket-checker miscounting of literal tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Panchovix committed Nov 20, 2024
1 parent b87e170 commit bbb7d9c
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 bbb7d9c

Please sign in to comment.