Skip to content

Commit b810634

Browse files
authored
Merge pull request #10053 from rust-lang/renovate/comrak-0.x
Update Rust crate comrak to v0.30.0
2 parents c865c0a + e872d39 commit b810634

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/crates_io_markdown/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ path = "lib.rs"
1414

1515
[dependencies]
1616
ammonia = "=4.0.0"
17-
comrak = { version = "=0.29.0", default-features = false }
17+
comrak = { version = "=0.30.0", default-features = false }
1818
htmlescape = "=0.3.1"
1919
url = "=2.5.3"
2020

crates/crates_io_markdown/lib.rs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,20 @@ impl<'a> MarkdownRenderer<'a> {
7171
ComrakRenderOptions,
7272
};
7373

74-
let mut render_options = ComrakRenderOptions::default();
75-
// The output will be sanitized with `ammonia`
76-
render_options.unsafe_ = true;
77-
78-
let mut extension_options = ComrakExtensionOptions::default();
79-
extension_options.autolink = true;
80-
extension_options.strikethrough = true;
81-
extension_options.table = true;
82-
extension_options.tagfilter = true;
83-
extension_options.tasklist = true;
84-
extension_options.header_ids = Some("user-content-".to_string());
85-
extension_options.footnotes = true;
74+
let render_options = ComrakRenderOptions::builder()
75+
// The output will be sanitized with `ammonia`
76+
.unsafe_(true)
77+
.build();
78+
79+
let extension_options = ComrakExtensionOptions::builder()
80+
.autolink(true)
81+
.strikethrough(true)
82+
.table(true)
83+
.tagfilter(true)
84+
.tasklist(true)
85+
.header_ids("user-content-".to_string())
86+
.footnotes(true)
87+
.build();
8688

8789
let options = ComrakOptions {
8890
render: render_options,

0 commit comments

Comments
 (0)