Skip to content

Commit f5970bd

Browse files
committed
add header ids
1 parent 0d0a11e commit f5970bd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,13 @@ impl Blog {
8686
let YamlHeader { author, title } = serde_yaml::from_str(yaml)?;
8787

8888
// next, the contents. we add + to get rid of the final "---\n\n"
89+
let options = ComrakOptions {
90+
ext_header_ids: Some(String::new()),
91+
..ComrakOptions::default()
92+
};
93+
8994
let contents =
90-
comrak::markdown_to_html(&contents[end_of_yaml + 5..], &ComrakOptions::default());
95+
comrak::markdown_to_html(&contents[end_of_yaml + 5..], &options);
9196

9297
// finally, the url.
9398
let mut url = PathBuf::from(&*filename);

0 commit comments

Comments
 (0)