diff --git a/Cargo.lock b/Cargo.lock index 71c2e5843..c3cf53cc3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -207,6 +207,31 @@ dependencies = [ "serde_yaml", ] +[[package]] +name = "bon" +version = "3.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe7acc34ff59877422326db7d6f2d845a582b16396b6b08194942bf34c6528ab" +dependencies = [ + "bon-macros", + "rustversion", +] + +[[package]] +name = "bon-macros" +version = "3.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4159dd617a7fbc9be6a692fe69dc2954f8e6bb6bb5e4d7578467441390d77fd0" +dependencies = [ + "darling", + "ident_case", + "prettyplease", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.92", +] + [[package]] name = "build_html" version = "2.5.0" @@ -364,17 +389,15 @@ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "comrak" -version = "0.26.0" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ab67843c57df5a4ee29d610740828dbc928cc64ecf0f2a1d5cd0e98e107a9" +checksum = "1664eb8abab93a9c09d1e85df10b4de6af0b4c738f267750b211a77a771447fe" dependencies = [ + "bon", "caseless", "clap 4.5.11", - "derive_builder", "entities", "memchr", - "once_cell", - "regex", "shell-words", "slug", "syntect", @@ -1334,6 +1357,16 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.92", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1579,6 +1612,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "ryu" version = "1.0.18" diff --git a/Cargo.toml b/Cargo.toml index f48122df9..12dab731e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ serde = "=1.0.217" serde_derive = "=1.0.217" serde_yaml = "=0.9.33" serde_json = "=1.0.137" -comrak = "=0.26.0" +comrak = { version = "=0.34.0", features = ["bon"] } rayon = "=1.10.0" regex = "=1.11.1" sass-rs = "=0.2.2" diff --git a/src/posts.rs b/src/posts.rs index a1672e9db..77c49c824 100644 --- a/src/posts.rs +++ b/src/posts.rs @@ -68,15 +68,13 @@ impl Post { } = serde_yaml::from_str(yaml)?; // next, the contents. we add + to get rid of the final "---\n\n" let options = comrak::Options { - render: comrak::RenderOptionsBuilder::default() - .unsafe_(true) - .build()?, - extension: comrak::ExtensionOptionsBuilder::default() - .header_ids(Some(String::new())) + render: comrak::RenderOptions::builder().unsafe_(true).build(), + extension: comrak::ExtensionOptions::builder() + .header_ids(String::new()) .strikethrough(true) .footnotes(true) .table(true) - .build()?, + .build(), ..comrak::Options::default() };