From cf6f08d1602841f8c337dc64365e2dcde1e4c528 Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Sun, 19 Apr 2026 17:55:42 +0200 Subject: fix(ast): error if title contains modifier --- src/title.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/title.zig') diff --git a/src/title.zig b/src/title.zig index d9b5612..de88c67 100644 --- a/src/title.zig +++ b/src/title.zig @@ -18,7 +18,10 @@ pub fn parse(alloc: Allocator, l: *Lexer) Error!Element { 6 => "h6", else => unreachable, }); - try el.appendContent(try paragraph.parseContent(alloc, l)); + try el.appendContent(paragraph.parseLine(alloc, l) catch |err| switch (err) { + paragraph.Error.IllegalPlacement => return Error.InvalidTitleContent, + else => return err, + }); v = (try l.next(alloc)) orelse return el; if (!v.kind.isDelimiter()) return Error.InvalidTitleContent; v.deinit(); -- cgit v1.2.3