Skip to content

Commit f2b5132

Browse files
author
Andrew Omondi
committed
Fixes failing tests
1 parent fa716cf commit f2b5132

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/Microsoft.OpenApi.Tests/StringExtensions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ public static string MakeLineBreaksEnvironmentNeutral(this string input)
1818
{
1919
return input.Replace("\r\n", "\n")
2020
.Replace('\r', '\n')
21-
.Replace("\n", Environment.NewLine);
21+
.Replace("\n", Environment.NewLine)
22+
.Replace($" {Environment.NewLine}", Environment.NewLine)// also cleanup new lines preceded with spaces
23+
.TrimEnd();
2224
}
2325
}
2426
}

0 commit comments

Comments
 (0)