Update find_replace ()

This commit is contained in:
Samarth Bhadane 2024-09-04 16:11:33 -07:00 committed by GitHub
parent 59047303c9
commit d0b9b955b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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")