Propagate the outDir to rstgen to fix hrefs for modules in subdirs (#14479)

This commit is contained in:
Kaushal Modi 2020-05-28 03:13:24 -04:00 • committed by GitHub
commit e62ccaa4dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 41 additions and 6 deletions

View file

@ -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)