mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Merge branch 'escape-single-quotes' into main
This prevents single quotes in the prompt from generating a parse error.
This commit is contained in:
commit
decd1a58d2
@ -109,6 +109,10 @@ def main_loop(t2i,parser,log,infile):
|
||||
if command.startswith(('#','//')):
|
||||
continue
|
||||
|
||||
# before splitting, escape single quotes so as not to mess
|
||||
# up the parser
|
||||
command = command.replace("'","\\'")
|
||||
|
||||
try:
|
||||
elements = shlex.split(command)
|
||||
except ValueError as e:
|
||||
|
Loading…
Reference in New Issue
Block a user