diff --git a/Cargo.lock b/Cargo.lock index 404e5d2c9bd..52d6254454e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2812,9 +2812,9 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.11.0" +version = "0.12.1" source = "registry+/~https://github.com/rust-lang/crates.io-index" -checksum = "8746739f11d39ce5ad5c2520a9b75285310dbfe78c541ccf832d38615765aec0" +checksum = "666f0f59e259aea2d72e6012290c09877a780935cc3c18b1ceded41f3890d59c" dependencies = [ "bitflags 2.6.0", "memchr", diff --git a/Cargo.toml b/Cargo.toml index c797f11c739..a7fc87cd4cd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -76,7 +76,7 @@ pathdiff = "0.2.1" percent-encoding = "2.3.1" pkg-config = "0.3.30" proptest = "1.5.0" -pulldown-cmark = { version = "0.11.0", default-features = false, features = ["html"] } +pulldown-cmark = { version = "0.12.0", default-features = false, features = ["html"] } rand = "0.8.5" regex = "1.10.5" rusqlite = { version = "0.32.0", features = ["bundled"] } diff --git a/crates/mdman/src/format/man.rs b/crates/mdman/src/format/man.rs index 72d45d35277..23ba5b13b8c 100644 --- a/crates/mdman/src/format/man.rs +++ b/crates/mdman/src/format/man.rs @@ -140,7 +140,7 @@ impl<'e> ManRenderer<'e> { suppress_paragraph = true; } } - Tag::BlockQuote(_kind) => { + Tag::BlockQuote(..) => { self.flush(); // .RS = move left margin over 3 // .ll = shrink line length @@ -256,14 +256,18 @@ impl<'e> ManRenderer<'e> { Tag::Image { .. } => { bail!("images are not currently supported") } - Tag::HtmlBlock { .. } | Tag::MetadataBlock { .. } => {} + Tag::HtmlBlock { .. } + | Tag::MetadataBlock { .. } + | Tag::DefinitionList + | Tag::DefinitionListTitle + | Tag::DefinitionListDefinition => {} } } Event::End(tag_end) => { match &tag_end { TagEnd::Paragraph => self.flush(), TagEnd::Heading(..) => {} - TagEnd::BlockQuote => { + TagEnd::BlockQuote(..) => { self.flush(); // restore left margin, restore line length self.output.push_str(".br\n.RE\n.ll\n"); @@ -317,7 +321,12 @@ impl<'e> ManRenderer<'e> { write!(self.output, "<{}>", escape(&dest_url)?)?; } } - TagEnd::Image | TagEnd::HtmlBlock | TagEnd::MetadataBlock(..) => {} + TagEnd::Image + | TagEnd::HtmlBlock + | TagEnd::MetadataBlock(..) + | TagEnd::DefinitionListDefinition + | TagEnd::DefinitionListTitle + | TagEnd::DefinitionList => {} } } Event::Text(t) => { diff --git a/crates/mdman/src/format/text.rs b/crates/mdman/src/format/text.rs index 30e01d6faa9..0bea17ef9e8 100644 --- a/crates/mdman/src/format/text.rs +++ b/crates/mdman/src/format/text.rs @@ -222,7 +222,11 @@ impl<'e> TextRenderer<'e> { Tag::Image { .. } => { bail!("images are not currently supported") } - Tag::HtmlBlock { .. } | Tag::MetadataBlock { .. } => {} + Tag::HtmlBlock { .. } + | Tag::MetadataBlock { .. } + | Tag::DefinitionList + | Tag::DefinitionListTitle + | Tag::DefinitionListDefinition => {} } } Event::End(tag_end) => match &tag_end { @@ -231,7 +235,7 @@ impl<'e> TextRenderer<'e> { self.hard_break(); } TagEnd::Heading(..) => {} - TagEnd::BlockQuote => { + TagEnd::BlockQuote(..) => { self.indent -= 3; } TagEnd::CodeBlock => { @@ -274,7 +278,12 @@ impl<'e> TextRenderer<'e> { write!(self.word, "<{}>", dest_url)?; } } - TagEnd::Image | TagEnd::HtmlBlock | TagEnd::MetadataBlock(..) => {} + TagEnd::HtmlBlock { .. } + | TagEnd::MetadataBlock { .. } + | TagEnd::DefinitionList + | TagEnd::DefinitionListTitle + | TagEnd::Image + | TagEnd::DefinitionListDefinition => {} }, Event::Text(t) | Event::Code(t) => { if wrap_text {