Fix source code links

This commit is contained in:
Nick Greenfield
2014-12-21 18:00:51 -05:00
parent e6245674f2
commit 905be30b97

View File

@@ -268,18 +268,18 @@ proc buildDoc(c: var TConfigData, destPath: string) =
commands = newSeq[string](len(c.doc) + len(c.srcdoc) + len(c.srcdoc2))
i = 0
for d in items(c.doc):
commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" %
[c.nimArgs, c.gitRepo, c.gitCommit, splitFile(d).dir,
commands[i] = "nim rst2html $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" %
[c.nimArgs, c.gitRepo, c.gitCommit,
destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc
for d in items(c.srcdoc):
commands[i] = "nim doc $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" %
[c.nimArgs, c.gitRepo, c.gitCommit, splitFile(d).dir,
commands[i] = "nim doc $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" %
[c.nimArgs, c.gitRepo, c.gitCommit,
destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc
for d in items(c.srcdoc2):
commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$#/$# -o:$# --index:on $#" %
[c.nimArgs, c.gitRepo, c.gitCommit, splitFile(d).dir,
commands[i] = "nim doc2 $# --docSeeSrcUrl:$#/$# -o:$# --index:on $#" %
[c.nimArgs, c.gitRepo, c.gitCommit,
destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc
@@ -311,8 +311,8 @@ proc buildAddDoc(c: var TConfigData, destPath: string) =
# build additional documentation (without the index):
var commands = newSeq[string](c.webdoc.len)
for i, doc in pairs(c.webdoc):
commands[i] = "nim doc $# --docSeeSrcUrl:$#/$#/$# -o:$# $#" %
[c.nimArgs, c.gitRepo, c.gitCommit, splitFile(doc).dir,
commands[i] = "nim doc $# --docSeeSrcUrl:$#/$# -o:$# $#" %
[c.nimArgs, c.gitRepo, c.gitCommit,
destPath / changeFileExt(splitFile(doc).name, "html"), doc]
mexec(commands, c.numProcessors)