diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 29eeced9be67d..5cdfda7d41390 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -1400,7 +1400,8 @@ proc generateDoc*(d: PDoc, n, orig: PNode, config: ConfigRef, docFlags: DocFlags for it in n: traceDeps(d, it) of nkExportStmt: for it in n: - if it.kind == nkSym: + # bug #23051; don't generate documentation for exported symbols again + if it.kind == nkSym and sfExported notin it.sym.flags: if d.module != nil and d.module == it.sym.owner: generateDoc(d, it.sym.ast, orig, config, kForceExport) elif it.sym.ast != nil: