aboutsummaryrefslogtreecommitdiff
path: root/src/parser.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-19 21:30:32 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-19 21:30:32 +0200
commitec6f949c48323a0bea244b723af547f60e0db33f (patch)
treef20497988d2e2c675153c60892cfe8e5715b7fb3 /src/parser.zig
parentfe3e8fe67b7f655699be321796af70d4bdff230f (diff)
style(ast): split paragraph and content
Diffstat (limited to 'src/parser.zig')
-rw-r--r--src/parser.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser.zig b/src/parser.zig
index 7419c2e..775dc4a 100644
--- a/src/parser.zig
+++ b/src/parser.zig
@@ -21,7 +21,9 @@ pub fn parse(parent: Allocator, content: []const u8) Error![]const u8 {
var l = try Lexer.init(content);
base: while (l.nextKind()) |it| {
try elements.append(alloc, switch (it) {
+ // block paragraph
.literal, .bold, .italic, .code, .link => try paragraph.parse(alloc, &l),
+ // other blocks
.title => try title.parse(alloc, &l),
.weak_delimiter, .strong_delimiter => {
var v = (try l.next(alloc)).?;