Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix handling of unicode when counting codeblock lines (#30364)
Michael Sloan857134d6dc24
diff --git a/crates/markdown/src/parser.rs b/crates/markdown/src/parser.rsindex 7c18a120012..e5e58472894 100644--- a/crates/markdown/src/parser.rs+++ b/crates/markdown/src/parser.rs@@ -80,8 +80,8 @@ pub fn parse_markdown(content_range.start + range.start..content_range.end + range.start;let line_count = text[content_range.clone()]- .bytes()- .filter(|c| *c == b'\n')+ .chars()+ .filter(|c| *c == '\n').count();let metadata = CodeBlockMetadata {content_range,