diff --git a/nimterop/tshelp.nim b/nimterop/tshelp.nim index 762cf7c..2eedcc6 100644 --- a/nimterop/tshelp.nim +++ b/nimterop/tshelp.nim @@ -269,12 +269,13 @@ proc getCommentsStr*(gState: State, commentNodes: seq[TSNode]): string = ## Generate a comment from a set of comment nodes. Comment is guaranteed ## to be able to be rendered using nim doc if commentNodes.len > 0: - result = "::" + result = "```" for commentNode in commentNodes: result &= "\n " & gState.getNodeVal(commentNode).strip() result = result.replace(re" *(//|/\*\*|\*\*/|/\*|\*/|\*)", "") - result = result.multiReplace([("\n", "\n "), ("`", "")]).strip() + result = result.multiReplace([("\n", "\n ")]).strip() + result &= "\n```" proc getCommentNodes*(gState: State, node: TSNode, maxSearch=1): seq[TSNode] = ## Get a set of comment nodes in order of priority. Will search up to ``maxSearch``