Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

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

Bennet Bo Fenner03a1c8d2b8c1
diff --git a/crates/markdown_preview/src/markdown_parser.rs b/crates/markdown_preview/src/markdown_parser.rs
index 10e910036b1..0b3c361fd26 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;
}
}
}