aboutsummaryrefslogtreecommitdiff
path: root/code/grammar
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-09-26 14:14:58 +0200
committermetamuffin <metamuffin@disroot.org>2022-09-26 14:14:58 +0200
commit15d78464ba9a717a71e1dc47a4101c8b13ec6581 (patch)
tree43def89ffd6e9c2ff80e7f7eeecec6fcf18c4e92 /code/grammar
parent0a18eae178a23e7f7bfd88c37502e5e8c1fdf64a (diff)
downloadmetamuffin-blog-15d78464ba9a717a71e1dc47a4101c8b13ec6581.tar
metamuffin-blog-15d78464ba9a717a71e1dc47a4101c8b13ec6581.tar.bz2
metamuffin-blog-15d78464ba9a717a71e1dc47a4101c8b13ec6581.tar.zst
syntax highlighting with syntect
Diffstat (limited to 'code/grammar')
-rw-r--r--code/grammar/markdown.pest9
1 files changed, 9 insertions, 0 deletions
diff --git a/code/grammar/markdown.pest b/code/grammar/markdown.pest
new file mode 100644
index 0000000..43c6e7a
--- /dev/null
+++ b/code/grammar/markdown.pest
@@ -0,0 +1,9 @@
+
+file = _{SOI ~ block* ~ EOI}
+block = { (header | list | span | "") ~ NEWLINE }
+header = {"#"+ ~ span}
+list = { list_item+ }
+list_item = { "-" ~ span }
+span = { (!NEWLINE ~ ANY)+ }
+
+