* fixes #20572

* added a test case
This commit is contained in:
Andreas Rumpf 2022-10-17 23:48:51 +02:00 • committed by GitHub
commit 81087c949f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 116 additions and 70 deletions

View file

@ -400,7 +400,7 @@ proc genRecCommentAux(d: PDoc, n: PNode): PRstNode =
result = genComment(d, n)
if result == nil:
if n.kind in {nkStmtList, nkStmtListExpr, nkTypeDef, nkConstDef,
nkObjectTy, nkRefTy, nkPtrTy, nkAsgn, nkFastAsgn, nkHiddenStdConv}:
nkObjectTy, nkRefTy, nkPtrTy, nkAsgn, nkFastAsgn, nkSinkAsgn, nkHiddenStdConv}:
# notin {nkEmpty..nkNilLit, nkEnumTy, nkTupleTy}:
for i in 0..<n.len:
result = genRecCommentAux(d, n[i])
@ -1551,7 +1551,7 @@ proc genSection(d: PDoc, kind: TSymKind, groupedToc = false) =
else:
# Just have the link
d.toc[kind] = getConfigVar(d.conf, "doc.section.toc_item") % sectionValues
proc relLink(outDir: AbsoluteDir, destFile: AbsoluteFile, linkto: RelativeFile): string =
$relativeTo(outDir / linkto, destFile.splitFile().dir, '/')