diff --git a/DocGen4/Output/Navbar.lean b/DocGen4/Output/Navbar.lean index 008ebdf..1b8a530 100644 --- a/DocGen4/Output/Navbar.lean +++ b/DocGen4/Output/Navbar.lean @@ -21,7 +21,8 @@ def moduleListFile (file : Name) : HtmlM Html := do partial def moduleListDir (h : Hierarchy) : HtmlM Html := do let children := Array.mk (h.getChildren.toList.map Prod.snd) let dirs := children.filter (λ c => c.getChildren.toList.length != 0) - let files := children.filter Hierarchy.isFile |>.map Hierarchy.getName + let files := children.filter (λ c => Hierarchy.isFile c ∧ c.getChildren.toList.length = 0) + |>.map Hierarchy.getName let dirNodes ← (dirs.mapM moduleListDir) let fileNodes ← (files.mapM moduleListFile) let moduleLink ← moduleNameToLink h.getName