fix: remove redundant link to parent module

main
Xubai Wang 2022-02-19 01:54:20 +08:00
parent 52d087a189
commit c31aef8e87
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ def moduleListFile (file : Name) : HtmlM Html := do
partial def moduleListDir (h : Hierarchy) : HtmlM Html := do partial def moduleListDir (h : Hierarchy) : HtmlM Html := do
let children := Array.mk (h.getChildren.toList.map Prod.snd) let children := Array.mk (h.getChildren.toList.map Prod.snd)
let dirs := children.filter (λ c => c.getChildren.toList.length != 0) 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 dirNodes ← (dirs.mapM moduleListDir)
let fileNodes ← (files.mapM moduleListFile) let fileNodes ← (files.mapM moduleListFile)
let moduleLink ← moduleNameToLink h.getName let moduleLink ← moduleNameToLink h.getName