We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43fd07b commit b952969Copy full SHA for b952969
1 file changed
src/toon_format/_scanner.py
@@ -207,6 +207,13 @@ def to_parsed_lines(
207
if not source.strip():
208
return [], []
209
210
+ # Normalize Windows CRLF line endings to LF
211
+ # This prevents stray \r characters from appearing in content
212
+ source = source.replace("\r\n", "\n")
213
+
214
+ # Strip any remaining standalone \r characters (old Mac format)
215
+ source = source.replace("\r", "\n")
216
217
lines = source.split("\n")
218
parsed: List[ParsedLine] = []
219
blank_lines: List[BlankLineInfo] = []
0 commit comments