diff options
author | Jake Leahy <jake@leahy.dev> | 2022-02-25 07:16:46 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-24 15:16:46 -0500 |
commit | 340b5a1676062aa9bc7f17a2e078eaba96821bf3 (patch) | |
tree | 7c2de1e206af9a5733b5a6aba372d93597b43ef4 /compiler | |
parent | 0c915b5e47e554d657f6533f262cebbcf1554e8f (diff) | |
download | Nim-340b5a1676062aa9bc7f17a2e078eaba96821bf3.tar.gz |
Document links repect --out in .idx file (#19543)
* Link in .idx file now respects --out:file switch * Use clearer chained calls Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/docgen.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim index 3e61032d8..aad3b9409 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -1499,7 +1499,10 @@ proc genOutFile(d: PDoc, groupedToc = false): string = # Extract the title. Non API modules generate an entry in the index table. if d.meta[metaTitle].len != 0: title = d.meta[metaTitle] - let external = presentationPath(d.conf, AbsoluteFile d.filename).changeFileExt(HtmlExt).string.nativeToUnixPath + let external = AbsoluteFile(d.destFile) + .relativeTo(d.conf.outDir, '/') + .changeFileExt(HtmlExt) + .string setIndexTerm(d[], external, "", title) else: # Modules get an automatic title for the HTML, but no entry in the index. |