aboutsummaryrefslogtreecommitdiff
path: root/src/parser.zig
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-19 17:55:42 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-19 17:55:42 +0200
commitcf6f08d1602841f8c337dc64365e2dcde1e4c528 (patch)
tree4e94b76fa7c035b2de9e983bab248063aef5a6b4 /src/parser.zig
parent25fa85cbb622e1f9dc9818b0d18fe0de2ef7e5a3 (diff)
fix(ast): error if title contains modifier
Diffstat (limited to 'src/parser.zig')
-rw-r--r--src/parser.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parser.zig b/src/parser.zig
index af571d4..442d823 100644
--- a/src/parser.zig
+++ b/src/parser.zig
@@ -74,6 +74,7 @@ test "parse paragraphs" {
try doTestError(alloc, "hello *world", Error.ModifierNotClosed);
try doTestError(alloc, "hello *wo_rld*", Error.ModifierNotClosed);
try doTestError(alloc, "*hell*o *wo_rld*", Error.ModifierNotClosed);
+ try doTestError(alloc, "hello ::: world", Error.IllegalPlacement);
}
test "parse title" {
@@ -85,6 +86,8 @@ test "parse title" {
try doTest(alloc, "## hey", "<h2>hey</h2>");
try doTest(alloc, "### hey", "<h3>hey</h3>");
+ try doTest(alloc, "# hello *world*", "<h1>hello <b>world</b></h1>");
+
try doTest(alloc,
\\# title
\\hello world ;3