diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-02-01 15:13:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-01 08:13:40 +0100 |
commit | ff8ab06720976f18d75257a22bf8e23873514c67 (patch) | |
tree | a4719ab7baf2aadd4c90e189bbfba4e1a116fc5d /nimdoc | |
parent | cbf3ed9d92b32e9e28f1e4d52300d9b103ee6fa1 (diff) | |
download | Nim-ff8ab06720976f18d75257a22bf8e23873514c67.tar.gz |
fixes #19396; Nimdoc hide nonexported fields (#21305)
* suppresses non-exported fields of types and adds command-line option to re-enable this if desired * corrected the doctest that produced a CI error * an embarrassingly bad error in reasoning * modified a nimdoc test to reflect updated behavior * needed another change to bring utils.html doctest in sync with update * add info * fix nimdoc * lint * render postfix * fixes a problem * fixes nimdoc * fix nimdoc --------- Co-authored-by: johnperry-math <john.perry@usm.edu> Co-authored-by: johnperry-math <devotus@yahoo.com>
Diffstat (limited to 'nimdoc')
-rw-r--r-- | nimdoc/extlinks/project/expected/main.html | 6 | ||||
-rw-r--r-- | nimdoc/testproject/expected/subdir/subdir_b/utils.html | 6 | ||||
-rw-r--r-- | nimdoc/testproject/expected/testproject.html | 12 | ||||
-rw-r--r-- | nimdoc/testproject/expected/testproject.idx | 1 | ||||
-rw-r--r-- | nimdoc/testproject/expected/theindex.html | 4 | ||||
-rw-r--r-- | nimdoc/testproject/testproject.nim | 4 |
6 files changed, 25 insertions, 8 deletions
diff --git a/nimdoc/extlinks/project/expected/main.html b/nimdoc/extlinks/project/expected/main.html index 5facedb3b..cf7982fde 100644 --- a/nimdoc/extlinks/project/expected/main.html +++ b/nimdoc/extlinks/project/expected/main.html @@ -55,8 +55,7 @@ <details open> <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary> <ul class="simple simple-toc-section"> - <li><a class="reference" href="#A" title="A = object - x: int">A</a></li> + <li><a class="reference" href="#A" title="A = object">A</a></li> </ul> </details> @@ -97,8 +96,7 @@ <dl class="item"> <div id="A"> <dt><pre><a href="main.html#A"><span class="Identifier">A</span></a> <span class="Other">=</span> <span class="Keyword">object</span> - <span class="Identifier">x</span><span class="Other">:</span> <span class="Identifier">int</span> -</pre></dt> + </pre></dt> <dd> diff --git a/nimdoc/testproject/expected/subdir/subdir_b/utils.html b/nimdoc/testproject/expected/subdir/subdir_b/utils.html index f0f30536f..ee2618ab3 100644 --- a/nimdoc/testproject/expected/subdir/subdir_b/utils.html +++ b/nimdoc/testproject/expected/subdir/subdir_b/utils.html @@ -59,8 +59,7 @@ <details open> <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary> <ul class="simple simple-toc-section"> - <li><a class="reference" href="#G" title="G[T] = object - val: T">G</a></li> + <li><a class="reference" href="#G" title="G[T] = object">G</a></li> <li><a class="reference" href="#SomeType" title="SomeType = enum enumValueA, enumValueB, enumValueC">SomeType</a></li> @@ -254,8 +253,7 @@ Ref. <a class="reference internal nimdoc" title="proc `[]`[T](x: G[T]): T" href= <dl class="item"> <div id="G"> <dt><pre><a href="utils.html#G"><span class="Identifier">G</span></a><span class="Other">[</span><span class="Identifier">T</span><span class="Other">]</span> <span class="Other">=</span> <span class="Keyword">object</span> - <span class="Identifier">val</span><span class="Other">:</span> <span class="Identifier">T</span> -</pre></dt> + </pre></dt> <dd> diff --git a/nimdoc/testproject/expected/testproject.html b/nimdoc/testproject/expected/testproject.html index 7d10d7900..45a53bb93 100644 --- a/nimdoc/testproject/expected/testproject.html +++ b/nimdoc/testproject/expected/testproject.html @@ -65,6 +65,8 @@ Circle, ## A circle Triangle, ## A three-sided shape Rectangle ## A four-sided shape">Shapes</a></li> +<li><a class="reference" href="#T19396" title="T19396 = object + a*: int">T19396</a></li> </ul> </details> @@ -401,6 +403,16 @@ </dd> </div> +<div id="T19396"> + <dt><pre><a href="testproject.html#T19396"><span class="Identifier">T19396</span></a> <span class="Other">=</span> <span class="Keyword">object</span> + <span class="Identifier">a</span><span class="Operator">*</span><span class="Other">:</span> <span class="Identifier">int</span> +</pre></dt> + <dd> + + + + </dd> +</div> </dl> </div> diff --git a/nimdoc/testproject/expected/testproject.idx b/nimdoc/testproject/expected/testproject.idx index e69bedf33..46ffaee72 100644 --- a/nimdoc/testproject/expected/testproject.idx +++ b/nimdoc/testproject/expected/testproject.idx @@ -63,5 +63,6 @@ nim Triangle testproject.html#Triangle Shapes.Triangle 380 nim Rectangle testproject.html#Rectangle Shapes.Rectangle 380 nim Shapes testproject.html#Shapes enum Shapes 380 nim anything testproject.html#anything proc anything() 387 +nim T19396 testproject.html#T19396 object T19396 392 nimgrp bar testproject.html#bar-procs-all proc 31 nimgrp baz testproject.html#baz-procs-all proc 34 diff --git a/nimdoc/testproject/expected/theindex.html b/nimdoc/testproject/expected/theindex.html index 7b4a95561..f9488eb2d 100644 --- a/nimdoc/testproject/expected/theindex.html +++ b/nimdoc/testproject/expected/theindex.html @@ -308,6 +308,10 @@ <li><a class="reference external" data-doc-search-tag="testproject: var someVariable" href="testproject.html#someVariable">testproject: var someVariable</a></li> </ul></dd> +<dt><a name="T19396" href="#T19396"><span>T19396:</span></a></dt><dd><ul class="simple"> +<li><a class="reference external" + data-doc-search-tag="testproject: object T19396" href="testproject.html#T19396">testproject: object T19396</a></li> + </ul></dd> <dt><a name="testNimDocTrailingExample" href="#testNimDocTrailingExample"><span>testNimDocTrailingExample:</span></a></dt><dd><ul class="simple"> <li><a class="reference external" data-doc-search-tag="testproject: template testNimDocTrailingExample()" href="testproject.html#testNimDocTrailingExample.t">testproject: template testNimDocTrailingExample()</a></li> diff --git a/nimdoc/testproject/testproject.nim b/nimdoc/testproject/testproject.nim index d236552ac..b5fa2ac37 100644 --- a/nimdoc/testproject/testproject.nim +++ b/nimdoc/testproject/testproject.nim @@ -388,3 +388,7 @@ when true: # issue #15184 ## ## There is no block quote after blank lines at the beginning. discard + +type T19396* = object # bug #19396 + a*: int + b: float |