This commit is contained in:
parent
1ddb496b6d
commit
25e3e6db8e
1 changed files with 3 additions and 1 deletions
|
|
@ -20,11 +20,12 @@ type
|
||||||
TGen = object of PPassContext
|
TGen = object of PPassContext
|
||||||
doc: PDoc
|
doc: PDoc
|
||||||
module: PSym
|
module: PSym
|
||||||
|
config: ConfigRef
|
||||||
PGen = ref TGen
|
PGen = ref TGen
|
||||||
|
|
||||||
template shouldProcess(g): bool =
|
template shouldProcess(g): bool =
|
||||||
(g.module.owner.id == g.doc.conf.mainPackageId and optWholeProject in g.doc.conf.globalOptions) or
|
(g.module.owner.id == g.doc.conf.mainPackageId and optWholeProject in g.doc.conf.globalOptions) or
|
||||||
sfMainModule in g.module.flags
|
sfMainModule in g.module.flags or g.config.projectMainIdx == g.module.info.fileIndex
|
||||||
|
|
||||||
template closeImpl(body: untyped) {.dirty.} =
|
template closeImpl(body: untyped) {.dirty.} =
|
||||||
var g = PGen(p)
|
var g = PGen(p)
|
||||||
|
|
@ -60,6 +61,7 @@ template myOpenImpl(ext: untyped) {.dirty.} =
|
||||||
var g: PGen
|
var g: PGen
|
||||||
new(g)
|
new(g)
|
||||||
g.module = module
|
g.module = module
|
||||||
|
g.config = graph.config
|
||||||
var d = newDocumentor(AbsoluteFile toFullPath(graph.config, FileIndex module.position),
|
var d = newDocumentor(AbsoluteFile toFullPath(graph.config, FileIndex module.position),
|
||||||
graph.cache, graph.config, ext)
|
graph.cache, graph.config, ext)
|
||||||
d.hasToc = true
|
d.hasToc = true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue