From 03a1c8d2b8c1e1a623702b70796d1c5b1d265aff Mon Sep 17 00:00:00 2001 From: Bennet Bo Fenner Date: Sat, 26 Oct 2024 14:59:46 +0200 Subject: [PATCH] markdown preview: Fix infinite loop in parser when parsing list items (#19785) Release Notes: - Fixed an issue with the markdown parser when opening a markdown preview file that contained HTML tags inside a list item --- crates/markdown_preview/src/markdown_parser.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/markdown_preview/src/markdown_parser.rs b/crates/markdown_preview/src/markdown_parser.rs index 10e910036b..0b3c361fd2 100644 --- a/crates/markdown_preview/src/markdown_parser.rs +++ b/crates/markdown_preview/src/markdown_parser.rs @@ -626,6 +626,8 @@ impl<'a> MarkdownParser<'a> { // Otherwise we need to insert the block after all the nested items // that have been parsed so far items.extend(block); + } else { + self.cursor += 1; } } }