turtle icon indicating copy to clipboard operation
turtle copied to clipboard

"inplace" seems to remove a newline from the end of the file.

Open mikevdg opened this issue 2 years ago • 1 comments

After running a script using "inplace", I appear to lose a newline character from the end of the file.

Running on Windows subsystem for Linux, Nix, unknown version of Turtle (because I haven't worked out how to do that yet.)

mikevdg avatar Jun 06 '22 23:06 mikevdg

Can you give an example reproduction? I was unable to reproduce for a sample input:

>>> writeTextFile "foo.txt" "abc\ndef\n"
>>> inplace chars1 "foo.txt"  -- Attempt to do nothing to the file, using `inplace`
>>> readTextFile "foo.txt"
"abc\ndef\n"

Gabriella439 avatar Jul 02 '22 18:07 Gabriella439