From: Christopher Hoskin Date: Sat, 4 Oct 2025 13:45:39 +0100 Subject: Upgrade pulldown-cmark from 0.11 to 0.13 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/elan-cli/term2.rs | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6268553..5adec27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1444,9 +1444,9 @@ dependencies = [ [[package]] name = "pulldown-cmark" -version = "0.11.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "679341d22c78c6c649893cbd6c3278dcbe9fc4faa62fea3a9296ae2b50c14625" +checksum = "1e8bbe1a966bd2f362681a44f6edce3c2310ac21e4d5067a6e7ec396297a6ea0" dependencies = [ "bitflags 2.6.0", "memchr", diff --git a/Cargo.toml b/Cargo.toml index ba0f884..6c56218 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ clap = "2.33.3" error-chain = "0.12.4" itertools = ">= 0.10.0" libc = "0.2.82" -pulldown-cmark = { version = ">= 0.10.3", default-features = false } +pulldown-cmark = { version = ">= 0.13", default-features = false } rand = "0.8.2" regex = "1.4.3" remove_dir_all = "0.8.0" diff --git a/src/elan-cli/term2.rs b/src/elan-cli/term2.rs index 715a395..3eb1677 100644 --- a/src/elan-cli/term2.rs +++ b/src/elan-cli/term2.rs @@ -175,6 +175,11 @@ impl<'a, T: Instantiable + Isatty + io::Write + 'a> LineFormatter<'a, T> { Tag::TableRow => {} Tag::TableCell => {} Tag::BlockQuote(_) => {} + Tag::DefinitionList => { + self.wrapper.write_line(); + self.wrapper.indent += 2; + } + Tag::DefinitionListTitle | Tag::DefinitionListDefinition => {} Tag::CodeBlock(_) | Tag::HtmlBlock { .. } => { self.wrapper.write_line(); self.wrapper.indent += 2; @@ -196,6 +201,8 @@ impl<'a, T: Instantiable + Isatty + io::Write + 'a> LineFormatter<'a, T> { Tag::Link { .. } => {} Tag::Image { .. } => {} Tag::FootnoteDefinition(_name) => {} + Tag::Superscript => {} + Tag::Subscript => {} } } @@ -212,7 +219,12 @@ impl<'a, T: Instantiable + Isatty + io::Write + 'a> LineFormatter<'a, T> { TagEnd::TableHead => {} TagEnd::TableRow => {} TagEnd::TableCell => {} - TagEnd::BlockQuote => {} + TagEnd::BlockQuote(_) => {} + TagEnd::DefinitionList => { + self.wrapper.indent -= 2; + self.wrapper.write_line(); + } + TagEnd::DefinitionListTitle | TagEnd::DefinitionListDefinition => {} TagEnd::CodeBlock | TagEnd::HtmlBlock => { self.wrapper.write_line(); self.wrapper.indent -= 2; @@ -234,6 +246,8 @@ impl<'a, T: Instantiable + Isatty + io::Write + 'a> LineFormatter<'a, T> { TagEnd::Image { .. } => {} // shouldn't happen, handled in start TagEnd::FootnoteDefinition => {} TagEnd::MetadataBlock(_) => {} + TagEnd::Superscript => {} + TagEnd::Subscript => {} } }