GCR deployment testing in progress - content type issue still remaining.
This commit is contained in:
@@ -25,6 +25,8 @@ namespace Htmx.SourceGenerator
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace {opt.RootNamespace};
|
||||
|
||||
@@ -67,12 +69,8 @@ public static class HtmxGeneratedExtensions
|
||||
writer.Advance(data.Length);
|
||||
}}
|
||||
|
||||
public static void WriteHtmxBody(this HttpContext context, IHtmxComponent component)
|
||||
{{
|
||||
context.Response.ContentType = ""text/html; charset=utf-8"";
|
||||
var writerContext = new HtmxRenderContext(context.Response.BodyWriter);
|
||||
component.Render(writerContext);
|
||||
}}
|
||||
public static HtmxResult WriteHtmxBody(this HttpContext context, IHtmxComponent component)
|
||||
=> new HtmxResult(component);
|
||||
}}";
|
||||
spc.AddSource("HtmxInfrastructure.g.cs", SourceText.From(infrastructureSource, Encoding.UTF8));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user