Render entry docs as markdown

This commit is contained in:
Chadtech 2021-04-18 17:42:58 -04:00
parent 406860f121
commit 2c5e541705

View File

@ -112,7 +112,7 @@ fn render_main_content(module: &ModuleDocumentation) -> String {
buf.push_str(html_node("h3", vec![("id", name)], content.as_str()).as_str());
if let Some(docs) = &entry.docs {
buf.push_str(docs.as_str());
buf.push_str(markdown_to_html(docs.to_string()).as_str());
}
}
@ -415,7 +415,9 @@ fn markdown_to_html(markdown: String) -> String {
}
},
);
let mut docs_html = String::new();
pulldown_cmark::html::push_html(&mut docs_html, docs_parser.into_iter());
docs_html
}