From 01e281ce107e57cc1865a0e09e89a8e8c79f2a4e Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 25 Sep 2023 21:05:19 -0500 Subject: [PATCH] markdown: Recognize `` tags with attributes as code (#8397) --- helix-term/src/ui/markdown.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs index 3c8a98685..4d0c0d4a5 100644 --- a/helix-term/src/ui/markdown.rs +++ b/helix-term/src/ui/markdown.rs @@ -184,7 +184,9 @@ impl Markdown { // Transform text in `` blocks into `Event::Code` let mut in_code = false; let parser = parser.filter_map(|event| match event { - Event::Html(tag) if *tag == *"" => { + Event::Html(tag) + if tag.starts_with("')) => + { in_code = true; None }