We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f97563 commit 4bafc33Copy full SHA for 4bafc33
content-gen/src/backend/app.py
@@ -1001,9 +1001,12 @@ async def generate():
1001
if existing_text and old_name and new_name and old_name != new_name:
1002
pat = re.compile(re.escape(old_name), re.IGNORECASE)
1003
if isinstance(existing_text, dict):
1004
- existing_text = {k: pat.sub(new_name, v) if isinstance(v, str) else v for k, v in existing_text.items()}
+ existing_text = {
1005
+ k: pat.sub(lambda _m: new_name, v) if isinstance(v, str) else v
1006
+ for k, v in existing_text.items()
1007
+ }
1008
elif isinstance(existing_text, str):
- existing_text = pat.sub(new_name, existing_text)
1009
+ existing_text = pat.sub(lambda _m: new_name, existing_text)
1010
1011
updated_content = {
1012
**existing_content,
0 commit comments