File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 144
144
145
145
var decl = zigAnalysis . types [ pkg . main ] ;
146
146
curNav . declObjs = [ decl ] ;
147
+ curNav . childDeclObjs = [ decl ] ;
148
+ var lastParentDecl = null ;
147
149
for ( var i = 0 ; i < curNav . declNames . length ; i += 1 ) {
148
150
var childDecl = findSubDecl ( decl , curNav . declNames [ i ] ) ;
149
151
if ( childDecl == null ) {
150
152
return render404 ( ) ;
151
153
}
154
+ lastParentDecl = childDecl ;
152
155
var container = getDeclContainerType ( childDecl ) ;
153
156
if ( container == null ) {
154
157
if ( i + 1 === curNav . declNames . length ) {
181
184
}
182
185
} else {
183
186
renderType ( lastDecl ) ;
187
+ renderTopLevelDecl ( lastParentDecl ) ;
184
188
}
185
189
}
186
190
741
745
}
742
746
}
743
747
748
+ function renderTopLevelDecl ( decl ) {
749
+ var node = zigAnalysis . astNodes [ decl . src ] ;
750
+ if ( node . docs != null ) {
751
+ domTldDocs . innerHTML = markdown ( node . docs ) ;
752
+ domTldDocs . classList . remove ( "hidden" ) ;
753
+ }
754
+ }
755
+
744
756
function renderType ( typeObj ) {
745
757
var name ;
746
758
if ( rootIsStd && typeObj === zigAnalysis . types [ zigAnalysis . packages [ zigAnalysis . rootPkg ] . main ] ) {
You can’t perform that action at this time.
0 commit comments