summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKaushal Modi <kaushal.modi@gmail.com>2018-10-09 14:48:00 -0400
committerAndreas Rumpf <rumpf_a@web.de>2018-10-09 20:48:00 +0200
commitc6dfbfc2cf8005d1c92dbf4453ad5b4a211900be (patch)
tree5f1ca79c14d6fef3b07b7c28c13d1dbe79cbabcf
parentc68ea019f9fd5d50fcbe6bd8196e4e0297e8c302 (diff)
downloadNim-c6dfbfc2cf8005d1c92dbf4453ad5b4a211900be.tar.gz
Do not encode the anchors in docs (`id` attr in `a` tags) (#9261)
Update the tests too.

Fixes https://github.com/nim-lang/Nim/issues/9232.
-rw-r--r--config/nimdoc.cfg2
-rw-r--r--nimdoc/testproject/expected/subdir/subdir_b/utils.html2
-rw-r--r--nimdoc/testproject/expected/testproject.html6
3 files changed, 5 insertions, 5 deletions
diff --git a/config/nimdoc.cfg b/config/nimdoc.cfg
index a955254f2..f89739df6 100644
--- a/config/nimdoc.cfg
+++ b/config/nimdoc.cfg
@@ -38,7 +38,7 @@ doc.section.toc = """
 # * $seeSrc: generated HTML from doc.item.seesrc (if some switches are used).
 
 doc.item = """
-<a id="$itemSymOrIdEnc"></a>
+<a id="$itemSymOrID"></a>
 <dt><pre>$header</pre></dt>
 <dd>
 $desc
diff --git a/nimdoc/testproject/expected/subdir/subdir_b/utils.html b/nimdoc/testproject/expected/subdir/subdir_b/utils.html
index 8ba90657b..e7f9cd508 100644
--- a/nimdoc/testproject/expected/subdir/subdir_b/utils.html
+++ b/nimdoc/testproject/expected/subdir/subdir_b/utils.html
@@ -1277,7 +1277,7 @@ function main() {
 <div class="section" id="12">
 <h1><a class="toc-backref" href="#12">Procs</a></h1>
 <dl class="item">
-<a id="someType%2C"></a>
+<a id="someType,"></a>
 <dt><pre><span class="Keyword">proc</span> <span class="Identifier">someType</span><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="utils.html#SomeType"><span class="Identifier">SomeType</span></a> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
 <dd>
 constructor.
diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html
index 2ea18323f..1d09d809c 100644
--- a/nimdoc/testproject/expected/testproject.html
+++ b/nimdoc/testproject/expected/testproject.html
@@ -1308,7 +1308,7 @@ function main() {
 <div class="section" id="12">
 <h1><a class="toc-backref" href="#12">Procs</a></h1>
 <dl class="item">
-<a id="bar%2CT%2CT"></a>
+<a id="bar,T,T"></a>
 <dt><pre><span class="Keyword">proc</span> <span class="Identifier">bar</span><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <span class="Identifier">T</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">T</span></pre></dt>
 <dd>
 
@@ -1319,7 +1319,7 @@ function main() {
 <div class="section" id="17">
 <h1><a class="toc-backref" href="#17">Macros</a></h1>
 <dl class="item">
-<a id="bar.m%2C"></a>
+<a id="bar.m,"></a>
 <dt><pre><span class="Keyword">macro</span> <span class="Identifier">bar</span><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt>
 <dd>
 
@@ -1330,7 +1330,7 @@ function main() {
 <div class="section" id="18">
 <h1><a class="toc-backref" href="#18">Templates</a></h1>
 <dl class="item">
-<a id="foo.t%2CSomeType%2CSomeType"></a>
+<a id="foo.t,SomeType,SomeType"></a>
 <dt><pre><span class="Keyword">template</span> <span class="Identifier">foo</span><span class="Other">(</span><span class="Identifier">a</span><span class="Other">,</span> <span class="Identifier">b</span><span class="Other">:</span> <a href="subdir/subdir_b/utils.html#SomeType"><span class="Identifier">SomeType</span></a><span class="Other">)</span></pre></dt>
 <dd>
 This does nothing