Skip to content

Commit

Permalink
Auto merge of #14668 - dacianpascu06:bump, r=epage
Browse files Browse the repository at this point in the history
chore(deps): update rust crate pulldown-cmark to 0.12.0

### What does this PR try to resolve?

Closes #14667

### How should we test and review this PR?
Cargo build-man stopped giving errors after updating pulldown-cmark
### Additional information
  • Loading branch information
bors committed Oct 10, 2024
2 parents 7aa7fb1 + 54bbe02 commit a460018
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
17 changes: 13 additions & 4 deletions crates/mdman/src/format/man.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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) => {
Expand Down
15 changes: 12 additions & 3 deletions crates/mdman/src/format/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -231,7 +235,7 @@ impl<'e> TextRenderer<'e> {
self.hard_break();
}
TagEnd::Heading(..) => {}
TagEnd::BlockQuote => {
TagEnd::BlockQuote(..) => {
self.indent -= 3;
}
TagEnd::CodeBlock => {
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit a460018

Please sign in to comment.