Skip to content

Commit

Permalink
Fix Windows line endings
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorpel committed Jul 17, 2024
1 parent ad03ff0 commit 44d1cb7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/ctod/util.d
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ else

string fileReadText(string path) @trusted
{
return cast(string) read(path);
version(Windows)
{
import std.string;
return (cast(string) read(path)).replace("\r", "");
}
else
return cast(string) read(path);
}
}

0 comments on commit 44d1cb7

Please sign in to comment.