浏览代码

Update find_replace (#3886)

Samarth Bhadane 8 月之前
父节点
当前提交
d0b9b955b8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      reflex/utils/path_ops.py

+ 1 - 1
reflex/utils/path_ops.py

@@ -209,4 +209,4 @@ def find_replace(directory: str | Path, find: str, replace: str):
             filepath = Path(root, file)
             text = filepath.read_text(encoding="utf-8")
             text = re.sub(find, replace, text)
-            filepath.write_text(text)
+            filepath.write_text(text, encoding="utf-8")