summary refs log tree commit diff stats
path: root/compiler/docgen2.nim
diff options
context:
space:
mode:
authorMiran <narimiran@disroot.org>2020-10-05 17:03:14 +0200
committerGitHub <noreply@github.com>2020-10-05 17:03:14 +0200
commit112b11c154af1f56b8c842b5723e6097d40d9e60 (patch)
treeae6f038d5f2b5f7a6ec175ef9bc44474b41e7aa3 /compiler/docgen2.nim
parent5967b6f60f669f343ed089a4cd09f324cbfc5c69 (diff)
downloadNim-112b11c154af1f56b8c842b5723e6097d40d9e60.tar.gz
group procs of the same name in TOC (#15487)
* group procs of the same name in TOC

* correctly show `sink` parameters in TOC

* no need to reinvent the wheel - `mgetorPut` exists

* better setting of text color [ci skip]

* fix CSS for better alignment
Diffstat (limited to 'compiler/docgen2.nim')
-rw-r--r--compiler/docgen2.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/docgen2.nim b/compiler/docgen2.nim
index 438417ca0..9cb40a7fc 100644
--- a/compiler/docgen2.nim
+++ b/compiler/docgen2.nim
@@ -29,6 +29,7 @@ proc shouldProcess(g: PGen): bool =
 template closeImpl(body: untyped) {.dirty.} =
   var g = PGen(p)
   let useWarning = sfMainModule notin g.module.flags
+  let groupedToc = true
   if shouldProcess(g):
     body
     try:
@@ -38,7 +39,7 @@ template closeImpl(body: untyped) {.dirty.} =
 
 proc close(graph: ModuleGraph; p: PPassContext, n: PNode): PNode =
   closeImpl:
-    writeOutput(g.doc, useWarning)
+    writeOutput(g.doc, useWarning, groupedToc)
 
 proc closeJson(graph: ModuleGraph; p: PPassContext, n: PNode): PNode =
   closeImpl: