Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Docfx.Build/PostProcessors/HtmlPostProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ namespace Docfx.Build.Engine;

sealed class HtmlPostProcessor : IPostProcessor
{
private static readonly UTF8Encoding Utf8EncodingWithoutBom = new(false);

public List<IHtmlDocumentHandler> Handlers { get; } = new();

private bool _handlerInitialized;
Expand Down Expand Up @@ -79,7 +81,7 @@ where output.Key.Equals(".html", StringComparison.OrdinalIgnoreCase)
}
using (var stream = EnvironmentContext.FileAbstractLayer.Create(tuple.OutputFile))
{
document.Save(stream, Encoding.UTF8);
document.Save(stream, Utf8EncodingWithoutBom);
}
}
foreach (var handler in Handlers)
Expand Down