Skip to content

Commit

Permalink
.NET7 SDK weirdness again
Browse files Browse the repository at this point in the history
  • Loading branch information
ScrubN committed Jul 31, 2023
1 parent 9cdcdc1 commit d4a3c67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions TwitchDownloaderCore/Chat/ChatHtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ public static class ChatHtml
}

await using var fs = File.Create(filePath);
await using var sw = new StreamWriter(fs, Encoding.Unicode);
await using var sw = new StreamWriter(fs);

while (!templateReader.EndOfStream)
{
var line = await templateReader.ReadLineAsync();
switch (line.AsSpan().TrimEnd("\r\n"))
switch (line)
{
case "<!-- TITLE -->":
await sw.WriteLineAsync(HttpUtility.HtmlEncode(Path.GetFileNameWithoutExtension(filePath)));
Expand Down Expand Up @@ -80,7 +80,7 @@ public static class ChatHtml
}
break;
default:
await sw.WriteLineAsync(line.AsMemory().TrimEnd("\r\n"), cancellationToken);
await sw.WriteLineAsync(line);
break;
}
}
Expand Down

0 comments on commit d4a3c67

Please sign in to comment.