summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorKaushal Modi <kaushal.modi@gmail.com>2020-05-28 03:13:24 -0400
committerGitHub <noreply@github.com>2020-05-28 00:13:24 -0700
commite62ccaa4dcc4f909e58c31be9073eb75b7f27950 (patch)
tree143c12802c5c5a9715c562b4a233fb44c9a80df3 /compiler
parent1fc40db984041ebc65470677ec69e621d26fd4df (diff)
downloadNim-e62ccaa4dcc4f909e58c31be9073eb75b7f27950.tar.gz
Propagate the outDir to rstgen to fix hrefs for modules in subdirs (#14479)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/docgen.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index 207294597..d1e2d42c5 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -47,7 +47,6 @@ type
     exampleCounter: int
     emitted: IntSet # we need to track which symbols have been emitted
                     # already. See bug #3655
-    destFile*: AbsoluteFile
     thisDir*: AbsoluteDir
     exampleGroups: OrderedTable[string, ExampleGroup]
     wroteSupportFiles*: bool
@@ -179,6 +178,7 @@ proc newDocumentor*(filename: AbsoluteFile; cache: IdentCache; conf: ConfigRef,
   result.module = module
   result.conf = conf
   result.cache = cache
+  result.outDir = conf.outDir
   initRstGenerator(result[], (if conf.cmd != cmdRst2tex: outHtml else: outLatex),
                    conf.configVars, filename.string, {roSupportRawDirective, roSupportMarkdown},
                    docgenFindFile, compilerMsgHandler)
@@ -1366,4 +1366,3 @@ proc commandBuildIndex*(conf: ConfigRef, dir: string, outFile = RelativeFile"")
 
   if not writeRope(code, filename):
     rawMessage(conf, errCannotOpenFile, filename.string)
-