Skip to content

Commit 3ecc86c

Browse files
committed
Fix linking (do not remove parent linking!)
1 parent 07e4ae2 commit 3ecc86c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

dottydoc/jvm/src/dotty/tools/dottydoc/core/Phases.scala

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,20 @@ object Phases {
130130
totalRuns = units.length
131131
val compUnits = super.runOn(units)
132132

133-
// (2) Create documentation template from docstrings, with internal links
133+
// (2) Set parents of entities, needed for linking
134+
for {
135+
parent <- packages.values
136+
child <- parent.children
137+
} setParent(child, to = parent)
138+
139+
// (3) Create documentation template from docstrings, with internal links
134140
println("Generating documentation, this might take a while...")
135141
commentParser.parse(packages)
136142

137-
// (3) Write the finished model to JSON
143+
// (4) Write the finished model to JSON
138144
if (!ctx.settings.YDocNoWrite.value) util.IndexWriters.writeJs(packages, "../js/out")
139145

140-
// (4) Clear caches
146+
// (5) Clear caches
141147
commentParser.clear()
142148

143149
// Return super's result

0 commit comments

Comments
 (0)