From 44d1cb7e87a0e31a6d064030f5e7141343e0d53f Mon Sep 17 00:00:00 2001 From: Dennis Korpel Date: Wed, 17 Jul 2024 22:31:53 +0200 Subject: [PATCH] Fix Windows line endings --- source/ctod/util.d | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/ctod/util.d b/source/ctod/util.d index 7fa3ba6..b264550 100644 --- a/source/ctod/util.d +++ b/source/ctod/util.d @@ -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); } }