Skip to content

Commit 6fa05dc

Browse files
committed
Fix breaking changes in comrak
1 parent e8c87ba commit 6fa05dc

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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.34.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)