diff options
author | Jake Leahy <jake@leahy.dev> | 2022-11-22 06:59:06 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-21 14:59:06 -0500 |
commit | 753868f16cf101073a7fc2d37d6b78310dd58d5c (patch) | |
tree | dc26e8ae5cf79afd5fe2c4bac61990e540729fd4 | |
parent | 19cc494b802210936328189a6e3aee3b1e8797a7 (diff) | |
download | Nim-753868f16cf101073a7fc2d37d6b78310dd58d5c.tar.gz |
Fix #14476 (#20878)
* Use link from webpage. Closes #14476 * Update doc generation tests * Update RST test
-rw-r--r-- | config/nimdoc.cfg | 4 | ||||
-rw-r--r-- | nimdoc/rst2html/expected/rst_examples.html | 2 | ||||
-rw-r--r-- | nimdoc/test_doctype/expected/test_doctype.html | 2 | ||||
-rw-r--r-- | nimdoc/test_out_index_dot_html/expected/index.html | 2 | ||||
-rw-r--r-- | nimdoc/testproject/expected/subdir/subdir_b/utils.html | 2 | ||||
-rw-r--r-- | nimdoc/testproject/expected/testproject.html | 2 | ||||
-rw-r--r-- | tools/dochack/dochack.nim | 2 |
7 files changed, 8 insertions, 8 deletions
diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg index eafc88b4e..abe039738 100644 --- a/config/nimdoc.cfg +++ b/config/nimdoc.cfg @@ -147,7 +147,7 @@ doc.body_toc_group = """ <ul class="simple-boot"> <li><a href="manual.html">Manual</a></li> <li><a href="lib.html">Standard library</a></li> - <li> <a href="$theindexhref">Index</a></li> + <li> <a id="indexLink" href="$theindexhref">Index</a></li> <li><a href="compiler/$theindexhref">Compiler docs</a></li> <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li> <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li> @@ -185,7 +185,7 @@ doc.body_toc_group = """ </div> <div id="global-links"> <ul class="simple"> - <li><a href="$theindexhref">Index</a></li> + <li><a id="indexLink" href="$theindexhref">Index</a></li> </ul> </div> <div id="searchInputDiv"> diff --git a/nimdoc/rst2html/expected/rst_examples.html b/nimdoc/rst2html/expected/rst_examples.html index 210dbce4e..72f6453f2 100644 --- a/nimdoc/rst2html/expected/rst_examples.html +++ b/nimdoc/rst2html/expected/rst_examples.html @@ -33,7 +33,7 @@ </div> <div id="global-links"> <ul class="simple"> - <li><a href="theindex.html">Index</a></li> + <li><a id="indexLink" href="theindex.html">Index</a></li> </ul> </div> <div id="searchInputDiv"> diff --git a/nimdoc/test_doctype/expected/test_doctype.html b/nimdoc/test_doctype/expected/test_doctype.html index 6e81ffd9d..01ad6e5a0 100644 --- a/nimdoc/test_doctype/expected/test_doctype.html +++ b/nimdoc/test_doctype/expected/test_doctype.html @@ -33,7 +33,7 @@ </div> <div id="global-links"> <ul class="simple"> - <li><a href="theindex.html">Index</a></li> + <li><a id="indexLink" href="theindex.html">Index</a></li> </ul> </div> <div id="searchInputDiv"> diff --git a/nimdoc/test_out_index_dot_html/expected/index.html b/nimdoc/test_out_index_dot_html/expected/index.html index e5148d1a3..22d5daa35 100644 --- a/nimdoc/test_out_index_dot_html/expected/index.html +++ b/nimdoc/test_out_index_dot_html/expected/index.html @@ -33,7 +33,7 @@ </div> <div id="global-links"> <ul class="simple"> - <li><a href="theindex.html">Index</a></li> + <li><a id="indexLink" href="theindex.html">Index</a></li> </ul> </div> <div id="searchInputDiv"> diff --git a/nimdoc/testproject/expected/subdir/subdir_b/utils.html b/nimdoc/testproject/expected/subdir/subdir_b/utils.html index f48c5edc2..7d59e9e86 100644 --- a/nimdoc/testproject/expected/subdir/subdir_b/utils.html +++ b/nimdoc/testproject/expected/subdir/subdir_b/utils.html @@ -33,7 +33,7 @@ </div> <div id="global-links"> <ul class="simple"> - <li><a href="../../theindex.html">Index</a></li> + <li><a id="indexLink" href="../../theindex.html">Index</a></li> </ul> </div> <div id="searchInputDiv"> diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html index f6bd56aa6..4caff7ec7 100644 --- a/nimdoc/testproject/expected/testproject.html +++ b/nimdoc/testproject/expected/testproject.html @@ -33,7 +33,7 @@ </div> <div id="global-links"> <ul class="simple"> - <li><a href="theindex.html">Index</a></li> + <li><a id="indexLink" href="theindex.html">Index</a></li> </ul> </div> <div id="searchInputDiv"> diff --git a/tools/dochack/dochack.nim b/tools/dochack/dochack.nim index 1a5c86253..4067d2ed4 100644 --- a/tools/dochack/dochack.nim +++ b/tools/dochack/dochack.nim @@ -255,7 +255,7 @@ proc dosearch(value: cstring): Element = var stuff: Element {.emit: """ var request = new XMLHttpRequest(); - request.open("GET", "theindex.html", false); + request.open("GET", document.getElementById("indexLink").href, false); request.send(null); var doc = document.implementation.createHTMLDocument("theindex"); |