this is not too big of an issue most of the time as if you have a literal opening token in prompts, you would almost alwase have a literal closing token
the internal prompt parser dose handles miss match (()or strangely ordered )( brackets
Screenshots/videos:
Current
Fixed
test sample text
should error
Current prompt-bracket-checker.js treats \( literal brackets and parentheses )
\(parentheses proceeded with a slash\) are treated as normal brackets
this is wrong, this SHOUD error
the literal parentheses on the 1st line shoud NOT be counted
resulting an extra closeing parentheses on 1st line
should not error
while this \( should NOT error
as the parentheses on the first line is literal
Description
Current the
prompt-bracket-checker.js
treats literal tokens as normal tokensthis is wrong
this can easily be fixed by modifying the regex to so it does not count tokens proceeded by a
\
internal prompt parser for reference https://github.com/AUTOMATIC1111/stable-diffusion-webui/blob/82a973c04367123ae98bd9abdf80d9eda9b910e2/modules/prompt_parser.py#L370-L382
Screenshots/videos:
Current
Fixed
test sample text
should error
should not error
Checklist: