diff --git a/src/CookieCrumble/src/CookieCrumble/Snapshot.cs b/src/CookieCrumble/src/CookieCrumble/Snapshot.cs index a626a0a5f4f..231264ed622 100644 --- a/src/CookieCrumble/src/CookieCrumble/Snapshot.cs +++ b/src/CookieCrumble/src/CookieCrumble/Snapshot.cs @@ -503,6 +503,12 @@ private static bool MatchSnapshot( bool inline, [NotNullWhen(false)] out string? snapshotDiff) { + if (OperatingSystem.IsWindows()) + { + // Normalize escaped line endings + after = after.Replace("\\r\\n", "\\n"); + } + var diff = InlineDiffBuilder.Diff(before, after); if (diff.HasDifferences)