mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-01 20:35:06 +08:00
fix prompt-bracket-checker miscounting of literal tokens (#16669)
This commit is contained in:
parent
957888a100
commit
cd869bb7a3
@ -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 = [];
|
||||
|
Loading…
Reference in New Issue
Block a user