From 80ca399d821cd6380c37e507f2b1b13007174221 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Tue, 28 Apr 2026 21:11:49 +0200 Subject: refactor(eval): generate figure in ast and not in eval for quote --- src/eval/blocks.zig | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/eval') diff --git a/src/eval/blocks.zig b/src/eval/blocks.zig index 9f96c3d..a270ec9 100644 --- a/src/eval/blocks.zig +++ b/src/eval/blocks.zig @@ -147,7 +147,6 @@ pub const Callout = struct { pub const Quote = struct { content: Element, - attribution: ?Element = null, node: Node = .{ .ptr = undefined, .vtable = .{ .element = fromNode }, @@ -178,10 +177,8 @@ pub const Quote = struct { fn html(context: *anyopaque, alloc: Allocator) HTML.Error!HTML { const self: *Self = @ptrCast(@alignCast(context)); - const quote = try Element.Simple("blockquote").init(alloc); - quote.content = self.content; - var el = try Figure.init(alloc, quote.element()); - el.caption = self.attribution; - return try el.element().html(alloc); + const quote = try HTML.Content.init(alloc, "blockquote"); + quote.content = try self.content.html(alloc); + return quote.element(); } }; -- cgit v1.2.3