GCR deployment testing in progress - content type issue still remaining.

This commit is contained in:
2026-05-05 14:42:03 +05:00
parent 40fe69ed65
commit f2d02a23ec
35 changed files with 2316 additions and 2431 deletions
+4 -6
View File
@@ -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));
});