From 901aa83e650ccc4b70f3fa15834d0ceedb97497a Mon Sep 17 00:00:00 2001 From: Lukas Neubert Date: Sat, 20 Feb 2021 15:03:10 +0100 Subject: [PATCH] vdoc: hide README toc entry without readme (#8841) --- cmd/tools/vdoc/html.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/tools/vdoc/html.v b/cmd/tools/vdoc/html.v index 7152edf3e5..8ea90c430d 100644 --- a/cmd/tools/vdoc/html.v +++ b/cmd/tools/vdoc/html.v @@ -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('
  • README') } else if dn.name != 'Constants' { toc.write('
  • $dn.kind $dn.name')