mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vdoc: hide README toc entry without readme (#8841)
This commit is contained in:
parent
329e3938d9
commit
901aa83e65
@ -515,6 +515,9 @@ fn write_toc(dn doc.DocNode, mut toc strings.Builder) {
|
||||
}
|
||||
}
|
||||
if is_module_readme(dn) {
|
||||
if dn.comments.len == 0 || (dn.comments.len > 0 && dn.comments[0].text.len == 0) {
|
||||
return
|
||||
}
|
||||
toc.write('<li class="open"><a href="#readme_$toc_slug">README</a>')
|
||||
} else if dn.name != 'Constants' {
|
||||
toc.write('<li class="open"><a href="#$toc_slug">$dn.kind $dn.name</a>')
|
||||
|
Loading…
Reference in New Issue
Block a user