diff options
author | Miran <narimiran@disroot.org> | 2019-02-02 13:23:10 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-02-02 13:23:10 +0100 |
commit | ad4e3fd28c03a8429a3b4bc0068af77018e81724 (patch) | |
tree | 5bdfc0035e61873314b71f717a930340151f07be | |
parent | 17d0ce9c1c32827e5fc40cb486d4e8fb16f377fc (diff) | |
download | Nim-ad4e3fd28c03a8429a3b4bc0068af77018e81724.tar.gz |
devel docs should point to devel src (#10529)
Currently, devel docs (https://nim-lang.github.io/Nim/lib.html) source links point to master branch, leading to outdated source code and showing the wrong line.
-rw-r--r-- | compiler/docgen.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim index b70561a1d..5af4c464e 100644 --- a/compiler/docgen.nim +++ b/compiler/docgen.nim @@ -656,7 +656,8 @@ proc genItem(d: PDoc, n, nameNode: PNode, k: TSymKind) = path = path[cwd.len+1 .. ^1].replace('\\', '/') let gitUrl = getConfigVar(d.conf, "git.url") if gitUrl.len > 0: - let commit = getConfigVar(d.conf, "git.commit", "master") + let defaultBranch = if NimPatch mod 2 == 1: "devel" else: "master" + let commit = getConfigVar(d.conf, "git.commit", defaultBranch) let develBranch = getConfigVar(d.conf, "git.devel", "devel") dispA(d.conf, seeSrcRope, "$1", "", [ropeFormatNamedVars(d.conf, docItemSeeSrc, ["path", "line", "url", "commit", "devel"], [rope path.string, |