mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-11-05 10:50:50 +08:00
committed by
Patrik Svensson
parent
fa85216554
commit
2dd0eb9f74
@@ -17,6 +17,11 @@ namespace Spectre.Console.Internal
|
||||
|
||||
public static string NormalizeLineEndings(this string text, bool native = false)
|
||||
{
|
||||
if (text == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var normalized = text?.Replace("\r\n", "\n")
|
||||
?.Replace("\r", string.Empty);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user