mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-01-14 22:38:02 -05: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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user