Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix `---` in Markdown docs not rendered correctly (#10606)
Thorsten Ballc834ea75efdf
diff --git a/crates/language/src/markdown.rs b/crates/language/src/markdown.rsindex 8f027c76e34..2735e6f090c 100644--- a/crates/language/src/markdown.rs+++ b/crates/language/src/markdown.rs@@ -5,7 +5,7 @@ use std::{ops::Range, path::PathBuf};use crate::{HighlightId, Language, LanguageRegistry};use gpui::{px, FontStyle, FontWeight, HighlightStyle, StrikethroughStyle, UnderlineStyle};-use pulldown_cmark::{CodeBlockKind, Event, Options, Parser, Tag, TagEnd};+use pulldown_cmark::{CodeBlockKind, Event, Parser, Tag, TagEnd};/// Parsed Markdown content.#[derive(Debug, Clone, Default)]@@ -165,7 +165,10 @@ pub async fn parse_markdown_block(let mut current_language = None;let mut list_stack = Vec::new();- for event in Parser::new_ext(markdown, Options::all()) {+ let mut options = pulldown_cmark::Options::all();+ options.remove(pulldown_cmark::Options::ENABLE_YAML_STYLE_METADATA_BLOCKS);++ for event in Parser::new_ext(markdown, options) {let prev_len = text.len();match event {Event::Text(t) => {