vdoc: fix indention of readme when generating docs with -readme in project root (#21232)

This commit is contained in:
Turiiya 2024-04-09 05:53:54 +02:00 committed by GitHub
parent efc395eb64
commit ba74ab0ccf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,7 @@ fn get_node_id(dn doc.DocNode) string {
} }
fn is_module_readme(dn doc.DocNode) bool { fn is_module_readme(dn doc.DocNode) bool {
return dn.comments.len > 0 && dn.content == 'module ${dn.name}' return dn.comments.len > 0 && (dn.content == 'module ${dn.name}' || dn.name == 'README')
} }
fn trim_doc_node_description(desc string) string { fn trim_doc_node_description(desc string) string {