fix: improve utf-8 support for file reading/writing (#32)

fixes #29

Signed-off-by: phernandez <paul@basicmachines.co>
This commit is contained in:
Paul Hernandez
2025-03-15 15:43:37 -05:00
committed by GitHub
parent 6b110b28dd
commit eb5e4ec6bd
10 changed files with 34 additions and 40 deletions
@@ -83,7 +83,7 @@ class MarkdownProcessor:
"""
# Dirty check if needed
if expected_checksum is not None:
current_content = path.read_text()
current_content = path.read_text(encoding="utf-8")
current_checksum = await file_utils.compute_checksum(current_content)
if current_checksum != expected_checksum:
raise DirtyFileError(f"File {path} has been modified")