Skip to content

Commit 298ef57

Browse files
committed
comrak: Adjust to new options APIs
1 parent 065fa84 commit 298ef57

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/posts.rs

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,19 @@ impl Post {
6868
layout,
6969
} = serde_yaml::from_str(yaml)?;
7070
// next, the contents. we add + to get rid of the final "---\n\n"
71+
72+
let mut render_options = ComrakRenderOptions::default();
73+
// Allow rendering of raw HTML
74+
render_options.unsafe_ = true;
75+
76+
let mut extension_options = ComrakExtensionOptions::default();
77+
extension_options.header_ids=Some(String::new());
78+
extension_options.footnotes=true;
79+
extension_options.table=true;
80+
7181
let options = ComrakOptions {
72-
render: ComrakRenderOptions {
73-
unsafe_: true, // Allow rendering of raw HTML
74-
..ComrakRenderOptions::default()
75-
},
76-
extension: ComrakExtensionOptions {
77-
header_ids: Some(String::new()),
78-
footnotes: true,
79-
table: true,
80-
..ComrakExtensionOptions::default()
81-
},
82+
render: render_options,
83+
extension: extension_options,
8284
..ComrakOptions::default()
8385
};
8486

0 commit comments

Comments
 (0)