aboutsummaryrefslogtreecommitdiff
path: root/src/code.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-27 20:49:13 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-27 20:49:13 +0200
commite154408e8ddeaee83242002f4c7af68b29d3a677 (patch)
treed0caadc01e77aa15edb204b1529fac168775329a /src/code.zig
parent3b0e9424a66058da82d11d432da886ec7b6ce7eb (diff)
feat(): support callout
Diffstat (limited to 'src/code.zig')
-rw-r--r--src/code.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/code.zig b/src/code.zig
index 5c5c0f2..c4af74d 100644
--- a/src/code.zig
+++ b/src/code.zig
@@ -24,7 +24,6 @@ pub fn parse(alloc: Allocator, l: *Lexer) Error!Element {
}
const code = try Element.Code.init(alloc);
code.attribute = data;
- const el = try Element.Figure.init(alloc, code.element());
while (l.next()) |it| {
if (it.kind == .code_block) return Error.InvalidCodeBlock;
if (it.kind.isDelimiter()) {
@@ -38,6 +37,7 @@ pub fn parse(alloc: Allocator, l: *Lexer) Error!Element {
}
var end = l.next() orelse return Error.InvalidCodeBlock;
if (end.kind != .code_block) return Error.InvalidCodeBlock;
+ const el = try Element.Figure.init(alloc, code.element());
end = l.next() orelse return el.element();
if (!end.kind.isDelimiter()) return Error.InvalidCodeBlock;
return el.element();