From 085819fcbe4dfbb6466676de7ca73e0ae26c1183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20L=C3=B8vhaug?= Date: Sun, 15 Sep 2024 21:47:07 +0200 Subject: [PATCH] Fix comment parsing --- src/md.pest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/md.pest b/src/md.pest index 3f634a4..5ea9b3c 100644 --- a/src/md.pest +++ b/src/md.pest @@ -66,7 +66,7 @@ code_line = { NEWLINE ~ (c_line_char | WHITESPACE_S)* } latex = { NEWLINE? ~ WHITESPACE_S* ~ !"\\" ~ "$"+ ~ WHITESPACE_S? ~ (latex_word | (NEWLINE ~ quote_prefix?))+ ~ "$"+ } link = { NEWLINE? ~ WHITESPACE_S* ~ (link_line | wiki_link | inline_link_wrapper) } link_line = _{ "[" ~ (link_word | NEWLINE)+ ~ "]" ~ "(" ~ link_data+ ~ ")" } -inline_link_wrapper = _{ "<" ~ inline_link ~ ">" } +inline_link_wrapper = _{ !comment ~ "<" ~ inline_link ~ ">" } wiki_link = _{ ("[[" ~ wiki_link_alone+ ~ "]]") | ("[[" ~ wiki_link_data+ ~ "|" ~ wiki_link_word+ ~ "]]") } normal = _{ word+ } o_list_counter = { digit+ ~ ". " }