Skip to content

Commit 17a8d3e

Browse files
authored
Update Rust crate comrak to v0.34.0 (#1382)
2 parents 65781e3 + 6fa05dc commit 17a8d3e

File tree

3 files changed

+49
-12
lines changed

3 files changed

+49
-12
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ serde = "=1.0.217"
1313
serde_derive = "=1.0.217"
1414
serde_yaml = "=0.9.33"
1515
serde_json = "=1.0.137"
16-
comrak = "=0.26.0"
16+
comrak = { version = "=0.34.0", features = ["bon"] }
1717
rayon = "=1.10.0"
1818
regex = "=1.11.1"
1919
sass-rs = "=0.2.2"

src/posts.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,13 @@ impl Post {
6868
} = serde_yaml::from_str(yaml)?;
6969
// next, the contents. we add + to get rid of the final "---\n\n"
7070
let options = comrak::Options {
71-
render: comrak::RenderOptionsBuilder::default()
72-
.unsafe_(true)
73-
.build()?,
74-
extension: comrak::ExtensionOptionsBuilder::default()
75-
.header_ids(Some(String::new()))
71+
render: comrak::RenderOptions::builder().unsafe_(true).build(),
72+
extension: comrak::ExtensionOptions::builder()
73+
.header_ids(String::new())
7674
.strikethrough(true)
7775
.footnotes(true)
7876
.table(true)
79-
.build()?,
77+
.build(),
8078
..comrak::Options::default()
8179
};
8280

0 commit comments

Comments
 (0)