aboutsummaryrefslogtreecommitdiff
path: root/grammar.ebnf
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <william@herges.fr>2026-04-18 15:35:46 +0200
committerAnhgelus Morhtuuzh <william@herges.fr>2026-04-18 15:35:46 +0200
commitc4f41ad2502567f641652eb745707d2c2817973b (patch)
treee72efc430924f05334219fc8ff690f4399d56d6c /grammar.ebnf
parent348c06fdf2109b2953724bb50775e788fdde9356 (diff)
feat(lexer): enforce delimiter requirements
Diffstat (limited to 'grammar.ebnf')
-rw-r--r--grammar.ebnf4
1 files changed, 2 insertions, 2 deletions
diff --git a/grammar.ebnf b/grammar.ebnf
index d443a9d..2acd7b0 100644
--- a/grammar.ebnf
+++ b/grammar.ebnf
@@ -5,7 +5,7 @@ weak-delimiter = "\n";
strong-delimiter = "\n\n", { "\n" };
(* blocks *)
-block = title | paragraph | quote | callout | code-block | math-block | image | footnotes;
+block = title | paragraph | quote | callout | code-block | math-block | image | footnotes | tag;
title = ? #{1,6} ?, " ", content;
paragraph = content, { weak-delimiter, content };
quote = ">", content, { weak-delimiter, ">", content }, [ paragraph ];
@@ -16,6 +16,7 @@ image = "![", [ content ], "](", content, ")", { weak-delimiter, content };
list-unordored = "- ", paragraph, { weak-delimiter, "- ", paragraph };
list-ordored = ". ", paragraph, { weak-delimiter, ". ", paragraph };
footnotes = "<", content, ":", paragraph, { weak-delimiter, "<", content, ":", paragraph };
+tag = "#", content;
(* content of a block *)
content = ? [^\n]+ ? | bold | italic | code-inline | math-inline | link | ref;
@@ -25,4 +26,3 @@ code-inline = "`", content, "`";
math-inline = "$", content, "$";
link = "[", [ content ], "](", content, ")";
ref = "<", content, ">";
-tag = "#", ? [^\n ]+ ?;