File: 0023-pulldown-cmark-0.12.patch

package info (click to toggle)
rustup 1.27.1-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,636 kB
  • sloc: sh: 856; python: 233; javascript: 183; makefile: 27
file content (46 lines) | stat: -rw-r--r-- 1,808 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
This patch is based on the upstream commit described below, adapted for use in
the Debian package by Peter Michael Green.

commit d68bbc42d755597006a4faf3c4aca5d8788adc2f
Author: Dirkjan Ochtman <dirkjan@ochtman.nl>
Date:   Mon Aug 19 17:31:09 2024 +0200

    Upgrade pulldown-cmark to 0.12

diff --git a/Cargo.toml b/Cargo.toml
index 44687063..973c7289 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -65,1 +65,1 @@
-pulldown-cmark = { version = "0.11", default-features = false }
+pulldown-cmark = { version = "0.12", default-features = false }
diff --git a/src/cli/markdown.rs b/src/cli/markdown.rs
index cd2b8ee5..6f107c98 100644
--- a/src/cli/markdown.rs
+++ b/src/cli/markdown.rs
@@ -132,6 +132,11 @@ impl<'a> LineFormatter<'a> {
             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;
@@ -168,7 +173,12 @@ impl<'a> LineFormatter<'a> {
             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.is_code_block = false;
                 self.wrapper.indent -= 2;