We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eee46a5 commit 706f63aCopy full SHA for 706f63a
modules/styles.py
@@ -42,7 +42,7 @@ def extract_style_text_from_prompt(style_text, prompt):
42
stripped_style_text = style_text.strip()
43
44
if "{prompt}" in stripped_style_text:
45
- left, right = stripped_style_text.split("{prompt}", 2)
+ left, _, right = stripped_style_text.partition("{prompt}")
46
if stripped_prompt.startswith(left) and stripped_prompt.endswith(right):
47
prompt = stripped_prompt[len(left):len(stripped_prompt)-len(right)]
48
return True, prompt
0 commit comments