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.
This commit is contained in:
2023-12-03 14:41:34 -06:00
parent 411898e9f4
commit 828f89cca2

View File

@ -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<string> ReadAllLines(string filename)