mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-26 19:09:58 +00:00
fix prompt-bracket-checker miscounting of literal tokens (#16669)
This commit is contained in:
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user