@@ -361,6 +361,29 @@ extension Swiftinit.GroupLists:HTML.OutputStreamable
361
361
}
362
362
}
363
363
364
+ let extensionsEmpty : Bool = self . extensions. allSatisfy ( \. isEmpty)
365
+
366
+ if let other: Unidoc . TopicGroup
367
+ {
368
+ html [ . section, { $0. class = " group topic " } ]
369
+ {
370
+ AutomaticHeading . seeAlso. window ( & $0,
371
+ listing: other. members,
372
+ limit: 12 ,
373
+ open: self . peerList. isEmpty && extensionsEmpty)
374
+ {
375
+ switch $1
376
+ {
377
+ case . scalar( let scalar) :
378
+ $0 [ . li] = self . context. card ( scalar)
379
+
380
+ case . text( let text) :
381
+ $0 [ . li] { $0 [ . span] { $0 [ . code] = text } }
382
+ }
383
+ }
384
+ }
385
+ }
386
+
364
387
if !self . peerList. isEmpty
365
388
{
366
389
html [ . section, { $0. class = " group sisters " } ]
@@ -383,33 +406,13 @@ extension Swiftinit.GroupLists:HTML.OutputStreamable
383
406
heading. window ( & $0,
384
407
listing: self . peerList,
385
408
limit: 12 ,
386
- open: self . extensions . allSatisfy ( \ . isEmpty ) )
409
+ open: extensionsEmpty )
387
410
{
388
411
$0 [ . li] = self . context. card ( $1)
389
412
}
390
413
}
391
414
}
392
415
393
- if let other: Unidoc . TopicGroup
394
- {
395
- html [ . section, { $0. class = " group topic " } ]
396
- {
397
- AutomaticHeading . seeAlso. window ( & $0,
398
- listing: other. members,
399
- limit: 12 )
400
- {
401
- switch $1
402
- {
403
- case . scalar( let scalar) :
404
- $0 [ . li] = self . context. card ( scalar)
405
-
406
- case . text( let text) :
407
- $0 [ . li] { $0 [ . span] { $0 [ . code] = text } }
408
- }
409
- }
410
- }
411
- }
412
-
413
416
for group : Unidoc . ExtensionGroup in self . extensions where !group. isEmpty
414
417
{
415
418
html [ . section, { $0. class = " group extension " } ]
0 commit comments