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/quote.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/quote.zig') diff --git a/src/quote.zig b/src/quote.zig index 8c24c7e..5456d5b 100644 --- a/src/quote.zig +++ b/src/quote.zig @@ -26,7 +26,8 @@ pub fn parse(alloc: Allocator, l: *Lexer) Error!Element { .strong_delimiter => break, else => root.append(try paragraph.parseLine(alloc, l)), }; - const el = try Element.Quote.init(alloc, root.element()); + const quote = try Element.Quote.init(alloc, root.element()); + const el = try Element.Figure.init(alloc, quote.element()); const v = l.peek() orelse return el.element(); if (v.kind == .strong_delimiter) { l.consume(); @@ -34,7 +35,7 @@ pub fn parse(alloc: Allocator, l: *Lexer) Error!Element { } const attr = try paragraph.parse(alloc, l); const p_el: *Element.paragraph.Block = @ptrCast(@alignCast(attr.ptr)); - el.attribution = (try p_el.toRoot(alloc)).element(); + el.caption = (try p_el.toRoot(alloc)).element(); return el.element(); } -- cgit v1.2.3