diff --git a/Cargo.lock b/Cargo.lock index 04c074b204842e5c1082a5f5222d2dc55a528049..886bdbb3113617665169bd12c83f26093913d761 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5238,7 +5238,7 @@ dependencies = [ "postage", "pretty_assertions", "project", - "pulldown-cmark 0.12.2", + "pulldown-cmark 0.13.0", "rand 0.9.2", "regex", "release_channel", @@ -9721,7 +9721,7 @@ dependencies = [ "linkify", "log", "node_runtime", - "pulldown-cmark 0.12.2", + "pulldown-cmark 0.13.0", "settings", "sum_tree", "theme", @@ -9745,7 +9745,7 @@ dependencies = [ "log", "markup5ever_rcdom", "pretty_assertions", - "pulldown-cmark 0.12.2", + "pulldown-cmark 0.13.0", "settings", "theme", "ui", @@ -12887,9 +12887,9 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.12.2" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f86ba2052aebccc42cbbb3ed234b8b13ce76f75c3551a303cb2bcffcff12bb14" +checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" dependencies = [ "bitflags 2.9.4", "memchr", @@ -13762,7 +13762,7 @@ dependencies = [ "gpui", "language", "linkify", - "pulldown-cmark 0.12.2", + "pulldown-cmark 0.13.0", "theme", "ui", "util", diff --git a/Cargo.toml b/Cargo.toml index a502232485d7ca8acdbfaaa1f9a49dad1b961fc4..adf5e7c21110f3fda81d2896413c5bd0f698adcb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -601,7 +601,7 @@ profiling = "1" prost = "0.9" prost-build = "0.9" prost-types = "0.9" -pulldown-cmark = { version = "0.12.0", default-features = false } +pulldown-cmark = { version = "0.13.0", default-features = false } quote = "1.0.9" rand = "0.9" rayon = "1.8" diff --git a/crates/markdown/src/parser.rs b/crates/markdown/src/parser.rs index 62b210f9e33a90a44790c521591ba6f94e8baaef..21738147eed1b5b02da1c85207736160bd37ceb3 100644 --- a/crates/markdown/src/parser.rs +++ b/crates/markdown/src/parser.rs @@ -18,7 +18,9 @@ const PARSE_OPTIONS: Options = Options::ENABLE_TABLES .union(Options::ENABLE_HEADING_ATTRIBUTES) .union(Options::ENABLE_PLUSES_DELIMITED_METADATA_BLOCKS) .union(Options::ENABLE_OLD_FOOTNOTES) - .union(Options::ENABLE_GFM); + .union(Options::ENABLE_GFM) + .union(Options::ENABLE_SUPERSCRIPT) + .union(Options::ENABLE_SUBSCRIPT); pub fn parse_markdown( text: &str, @@ -149,6 +151,8 @@ pub fn parse_markdown( pulldown_cmark::Tag::Emphasis => MarkdownTag::Emphasis, pulldown_cmark::Tag::Strong => MarkdownTag::Strong, pulldown_cmark::Tag::Strikethrough => MarkdownTag::Strikethrough, + pulldown_cmark::Tag::Superscript => MarkdownTag::Superscript, + pulldown_cmark::Tag::Subscript => MarkdownTag::Subscript, pulldown_cmark::Tag::Image { link_type, dest_url, @@ -454,6 +458,8 @@ pub enum MarkdownTag { Emphasis, Strong, Strikethrough, + Superscript, + Subscript, /// A link. Link { @@ -548,7 +554,8 @@ mod tests { const UNWANTED_OPTIONS: Options = Options::ENABLE_YAML_STYLE_METADATA_BLOCKS .union(Options::ENABLE_MATH) - .union(Options::ENABLE_DEFINITION_LIST); + .union(Options::ENABLE_DEFINITION_LIST) + .union(Options::ENABLE_WIKILINKS); #[test] fn all_options_considered() {