docs-ui: Wrap module entry defs in section elements

This commit is contained in:
Mfon Eti-mfon 2022-07-03 23:04:57 +01:00
parent a2e44604c8
commit 873142b473
No known key found for this signature in database
GPG key ID: C79D87B2D3688E26

View file

@ -191,6 +191,8 @@ fn render_module_documentation(
if should_render_entry {
match entry {
DocEntry::DocDef(doc_def) => {
buf.push_str("<section>");
let mut href = String::new();
href.push('#');
href.push_str(doc_def.name.as_str());
@ -239,6 +241,8 @@ fn render_module_documentation(
.as_str(),
);
}
buf.push_str("</section>");
}
DocEntry::DetachedDoc(docs) => {
let markdown = markdown_to_html(