blob: cd7094fe4e481bd1c6c782c37afdc746989274fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
const Minifier = @import("Minifier.zig");
const Element = @import("html").Element;
tag: ?@EnumLiteral(),
minifier: Minifier,
pub fn load(comptime self: @This(), comptime content: []const u8) Element {
if (self.tag) |tag| {
return .native(
tag,
.{},
.content(comptime self.minifier.minify(content)),
);
} else {
return .transparent(.content(comptime self.minifier.minify(content)));
}
}
|