diff --git a/src/ThisAssembly.Strings/Model.cs b/src/ThisAssembly.Strings/Model.cs index 3693b9f2..f34f306f 100644 --- a/src/ThisAssembly.Strings/Model.cs +++ b/src/ThisAssembly.Strings/Model.cs @@ -51,7 +51,8 @@ public static ResourceArea Load(IEnumerable data, string rootArea) if (valueElement == null) continue; - var comment = element.Element("comment")?.Value? + // Make sure we trim newlines and replace them with spaces for comments. + var comment = (element.Element("comment")?.Value ?? valueElement) .Replace("<", "<") .Replace(">", ">") .Replace("\r\n", " ").Replace("\n", " "); diff --git a/src/ThisAssembly.Tests/Resources.resx b/src/ThisAssembly.Tests/Resources.resx index 5335b067..0c455cce 100644 --- a/src/ThisAssembly.Tests/Resources.resx +++ b/src/ThisAssembly.Tests/Resources.resx @@ -132,4 +132,8 @@ Hello {first}, {last}. Should we call you {first}? + + Hello, +World! + \ No newline at end of file