From 64386b3112857d4329571fad7464d09b3daa3bcc Mon Sep 17 00:00:00 2001 From: Tanguy Date: Tue, 5 Apr 2022 12:16:00 +0200 Subject: [PATCH] Fix nimdoc for async procs (#260) --- chronos/asyncmacro2.nim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chronos/asyncmacro2.nim b/chronos/asyncmacro2.nim index 0d3e634..7860a9f 100644 --- a/chronos/asyncmacro2.nim +++ b/chronos/asyncmacro2.nim @@ -112,6 +112,10 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} = var outerProcBody = newNimNode(nnkStmtList, prc.body) + # Copy comment for nimdoc + if prc.body.len > 0 and prc.body[0].kind == nnkCommentStmt: + outerProcBody.add(prc.body[0]) + # -> iterator nameIter(chronosInternalRetFuture: Future[T]): FutureBase {.closure.} = # -> {.push warning[resultshadowed]: off.}