markdown preview: Fix infinite loop in parser when parsing list items (#19785)

Bennet Bo Fenner created

Release Notes:

- Fixed an issue with the markdown parser when opening a markdown
preview file that contained HTML tags inside a list item

Change summary

crates/markdown_preview/src/markdown_parser.rs | 2 ++
1 file changed, 2 insertions(+)

Detailed changes

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;
                     }
                 }
             }