Do not parse trailing newlines in text resources. Closes #399

This commit is contained in:
berichan 2021-02-12 14:41:06 +00:00
parent c897c5880b
commit d6961b0d3d

View File

@ -34,7 +34,7 @@ public static string[] LoadStringList(string file, string? txt)
{
if (txt == null)
return Array.Empty<string>();
string[] rawlist = txt.Split('\n');
string[] rawlist = txt.TrimEnd('\r', '\n').Split('\n');
for (int i = 0; i < rawlist.Length; i++)
rawlist[i] = rawlist[i].TrimEnd('\r');