diff --git a/PwshSpectreConsole/private/classes/PwshSpectreConsole.Recording.cs b/PwshSpectreConsole/private/classes/PwshSpectreConsole.Recording.cs index 462a32e7..cf341218 100644 --- a/PwshSpectreConsole/private/classes/PwshSpectreConsole.Recording.cs +++ b/PwshSpectreConsole/private/classes/PwshSpectreConsole.Recording.cs @@ -175,6 +175,8 @@ public RecordingConsole(int width, int height) public string GetAsciiCastRecording(string title) { string json = _writer.GetOutput(); + json = Regex.Replace(json, @"\\n", @"\r\n"); + json = Regex.Replace(json, @"\\r\\r\\n", @"\r\n"); // count number of times [2A appears in the json var cursorUps = Regex.Matches(json, @"\[([0-9]+)A"); var countOfCursorUps = 0;