From 01e281ce107e57cc1865a0e09e89a8e8c79f2a4e Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Mon, 25 Sep 2023 21:05:19 -0500 Subject: markdown: Recognize `` tags with attributes as code (#8397) --- helix-term/src/ui/markdown.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'helix-term') diff --git a/helix-term/src/ui/markdown.rs b/helix-term/src/ui/markdown.rs index 3c8a9868..4d0c0d4a 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 } -- cgit v1.2.3-70-g09d2