From 0bc6d195195d1e126b535554a4a4105468cd06d9 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 3 Aug 2026 17:07:05 +0200 Subject: add tokenizer for whitespaces in js --- src/html/Element.zig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/html/Element.zig') diff --git a/src/html/Element.zig b/src/html/Element.zig index 8ecf31e..a9e5897 100644 --- a/src/html/Element.zig +++ b/src/html/Element.zig @@ -39,7 +39,7 @@ fn attributesFrom(attributes: anytype) []const Attribute { const name = field.name; const value = @field(attributes, name); - const next_attr: []const Attribute = &.{ .{ .name = name, .value = value } }; + const next_attr: []const Attribute = &.{.{ .name = name, .value = value }}; attrs = attrs ++ next_attr; } @@ -79,7 +79,6 @@ pub fn toHtml(comptime self: Self) []const u8 { break :string string; }; - switch (self.content) { .void => {}, .string => |s| { @@ -91,7 +90,7 @@ pub fn toHtml(comptime self: Self) []const u8 { } string = string ++ ""; - } + }, } string = string ++ if (self.tag.len == 0) "" else ""; -- cgit v1.2.3-70-g09d2