We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a1a154 commit 1b79e43Copy full SHA for 1b79e43
1 file changed
src/treemapper/tree.py
@@ -112,6 +112,7 @@ def _read_file_content(file_path: Path, max_file_bytes: Optional[int]) -> str:
112
return f"<binary file: {file_size} bytes>\n"
113
114
content = raw_bytes.decode("utf-8")
115
+ content = content.replace("\r\n", "\n").replace("\r", "\n")
116
cleaned = content.replace("\x00", "")
117
if cleaned != content:
118
logging.warning(f"Removed NULL bytes from content of {file_path.name}")
0 commit comments