Browse Source

StringResourceTool: normalize newlines when writing .resx files

pull/1/head
Daniel Grunwald 15 years ago
parent
commit
7d4d8a2601
  1. 3
      src/Tools/StringResourceTool/ResourceDatabase.cs

3
src/Tools/StringResourceTool/ResourceDatabase.cs

@ -73,7 +73,8 @@ namespace StringResourceTool @@ -73,7 +73,8 @@ namespace StringResourceTool
{
using (ResXResourceWriter writer = new ResXResourceWriter(filename)) {
foreach (ResourceEntry entry in Entries.Values.OrderBy(e => e.Key, StringComparer.OrdinalIgnoreCase)) {
writer.AddResource(entry.Key, entry.Value);
string normalizedValue = entry.Value.Replace("\r", "").Replace("\n", Environment.NewLine);
writer.AddResource(entry.Key, normalizedValue);
}
}
}

Loading…
Cancel
Save