From 828f89cca25311a5bc63210680844c985b0e0a80 Mon Sep 17 00:00:00 2001 From: Parnic Date: Sun, 3 Dec 2023 14:41:34 -0600 Subject: [PATCH] Fix ReadAllText I guess I've either never used this or only used it for one-line files because it was only ever returning the last line of the file. --- src/Util/Parsing.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Util/Parsing.cs b/src/Util/Parsing.cs index 16d6eed..108784a 100644 --- a/src/Util/Parsing.cs +++ b/src/Util/Parsing.cs @@ -72,9 +72,9 @@ public static class Parsing internal static string ReadAllText(string filename) { - string contents = string.Empty; - ReadData(filename, (line) => contents = line); - return contents; + StringBuilder sb = new(); + ReadData(filename, (line) => sb.AppendLine(line)); + return sb.ToString().Trim(); } internal static IEnumerable ReadAllLines(string filename)