diff options
Diffstat (limited to 'helix-term/src/ui/markdown.rs')
-rw-r--r-- | helix-term/src/ui/markdown.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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 `<code>` blocks into `Event::Code` let mut in_code = false; let parser = parser.filter_map(|event| match event { - Event::Html(tag) if *tag == *"<code>" => { + Event::Html(tag) + if tag.starts_with("<code") && matches!(tag.chars().nth(5), Some(' ' | '>')) => + { in_code = true; None } |