summary refs log tree commit diff stats
path: root/compiler/docgen2.nim
diff options
context:
space:
mode:
authorYuriy Glukhov <yuriy.glukhov@gmail.com>2018-05-15 19:54:52 +0300
committerYuriy Glukhov <yuriy.glukhov@gmail.com>2018-05-15 19:54:52 +0300
commitcfe40a3e6e920ed0c105af0012af739794c10b55 (patch)
treee823d767192acd7a3988f963633eaaa7a39cb4b3 /compiler/docgen2.nim
parent5d166fcc0ae1ab203f965f0650fd4834542a46f6 (diff)
parent02f01470ab46067c18535605179b95b143b1e25f (diff)
downloadNim-cfe40a3e6e920ed0c105af0012af739794c10b55.tar.gz
Merge branch 'devel' into yield-in-try
Diffstat (limited to 'compiler/docgen2.nim')
-rw-r--r--compiler/docgen2.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/docgen2.nim b/compiler/docgen2.nim
index 118f1c7c5..d9a73e1cd 100644
--- a/compiler/docgen2.nim
+++ b/compiler/docgen2.nim
@@ -25,8 +25,8 @@ template closeImpl(body: untyped) {.dirty.} =
   var g = PGen(p)
   let useWarning = sfMainModule notin g.module.flags
   #echo g.module.name.s, " ", g.module.owner.id, " ", gMainPackageId
-  if (g.module.owner.id == gMainPackageId and gWholeProject) or
-    sfMainModule in g.module.flags:
+  if (g.module.owner.id == gMainPackageId and optWholeProject in g.doc.conf.globalOptions) or
+      sfMainModule in g.module.flags:
     body
     try:
       generateIndex(g.doc)
@@ -55,7 +55,7 @@ proc myOpen(graph: ModuleGraph; module: PSym; cache: IdentCache): PPassContext =
   var g: PGen
   new(g)
   g.module = module
-  var d = newDocumentor(module.filename, options.gConfigVars)
+  var d = newDocumentor(module.filename, graph.config)
   d.hasToc = true
   g.doc = d
   result = g