@@ -114,12 +114,8 @@ async def write_file_atomic(path: FilePath, content: str) -> None:
114114 temp_path = path_obj .with_suffix (".tmp" )
115115
116116 try :
117- # Trigger: Basic Memory writes markdown and metadata from normalized Python strings.
118- # Why: Windows text mode would translate "\n" into "\r\n", which makes the
119- # persisted bytes diverge from the in-memory content we index and hash.
120- # Outcome: force LF on every platform so file bytes, checksums, and move detection
121- # stay deterministic across local and CI environments.
122- async with aiofiles .open (temp_path , mode = "w" , encoding = "utf-8" , newline = "\n " ) as f :
117+ # Use aiofiles for non-blocking write
118+ async with aiofiles .open (temp_path , mode = "w" , encoding = "utf-8" ) as f :
123119 await f .write (content )
124120
125121 # Atomic rename (this is fast, doesn't need async)
@@ -172,7 +168,7 @@ async def format_markdown_builtin(path: Path) -> Optional[str]:
172168
173169 # Only write if content changed
174170 if formatted_content != content :
175- async with aiofiles .open (path , mode = "w" , encoding = "utf-8" , newline = " \n " ) as f :
171+ async with aiofiles .open (path , mode = "w" , encoding = "utf-8" ) as f :
176172 await f .write (formatted_content )
177173
178174 logger .debug (
0 commit comments