fix #8871 runnableExamples now preserves source code comments, litterals, and all formatting; other bug fix (#14439)
* fix #8871 runnableExamples now preserves source code comments, litterals, and all formatting * remove orig deadcode from getAllRunnableExamplesImpl * fix expected examples * add test to close https://github.com/nim-lang/Nim/issues/14473 * correctly handle regular comments before 1st token inside runnableExamples * add test to answer https://github.com/nim-lang/Nim/pull/14439#discussion_r431829199 * update tests
This commit is contained in:
parent
17d08ff71c
commit
e013ebc91a
12 changed files with 927 additions and 76 deletions
|
|
@ -129,6 +129,8 @@ function main() {
|
|||
title="aEnum(): untyped"><wbr />a<wbr />Enum<span class="attachedType"></span></a></li>
|
||||
<li><a class="reference" href="#bEnum.t"
|
||||
title="bEnum(): untyped"><wbr />b<wbr />Enum<span class="attachedType"></span></a></li>
|
||||
<li><a class="reference" href="#fromUtilsGen.t"
|
||||
title="fromUtilsGen(): untyped"><wbr />from<wbr />Utils<wbr />Gen<span class="attachedType"></span></a></li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
|
@ -193,6 +195,15 @@ constructor.
|
|||
|
||||
|
||||
|
||||
</dd>
|
||||
<a id="fromUtilsGen.t"></a>
|
||||
<dt><pre><span class="Keyword">template</span> <a href="#fromUtilsGen.t"><span class="Identifier">fromUtilsGen</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">untyped</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
this should be shown in utils.html
|
||||
<p><strong class="examples_text">Example:</strong></p>
|
||||
<pre class="listing"><span class="Identifier">assert</span><span class="Whitespace"> </span><span class="DecNumber">3</span><span class="Operator">*</span><span class="DecNumber">2</span><span class="Whitespace"> </span><span class="Operator">==</span><span class="Whitespace"> </span><span class="DecNumber">6</span></pre>ditto
|
||||
|
||||
</dd>
|
||||
|
||||
</dl></div>
|
||||
|
|
|
|||
|
|
@ -10,3 +10,4 @@ SomeType subdir/subdir_b/utils.html#SomeType utils: SomeType
|
|||
someType subdir/subdir_b/utils.html#someType_2 utils: someType(): SomeType
|
||||
aEnum subdir/subdir_b/utils.html#aEnum.t utils: aEnum(): untyped
|
||||
bEnum subdir/subdir_b/utils.html#bEnum.t utils: bEnum(): untyped
|
||||
fromUtilsGen subdir/subdir_b/utils.html#fromUtilsGen.t utils: fromUtilsGen(): untyped
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue