mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-13 06:43:52 +00:00
* fix #16164, render doc comments * add a test
This commit is contained in:
@@ -541,7 +541,7 @@ proc isDefined*(conf: ConfigRef; symbol: string): bool =
|
||||
osDragonfly, osMacosx}
|
||||
else: discard
|
||||
|
||||
proc importantComments*(conf: ConfigRef): bool {.inline.} = conf.cmd notin cmdDocLike + {cmdIdeTools}
|
||||
proc importantComments*(conf: ConfigRef): bool {.inline.} = conf.cmd in cmdDocLike + {cmdIdeTools}
|
||||
proc usesWriteBarrier*(conf: ConfigRef): bool {.inline.} = conf.selectedGC >= gcRefc
|
||||
|
||||
template compilationCachePresent*(conf: ConfigRef): untyped =
|
||||
|
||||
@@ -120,7 +120,9 @@ function main() {
|
||||
<li>
|
||||
<a class="reference reference-toplevel" href="#8" id="58">Vars</a>
|
||||
<ul class="simple simple-toc-section">
|
||||
<li><a class="reference" href="#aVariable"
|
||||
<li><a class="reference" href="#someVariable"
|
||||
title="someVariable: bool">someVariable</a></li>
|
||||
<li><a class="reference" href="#aVariable"
|
||||
title="aVariable: array[1, int]">aVariable</a></li>
|
||||
|
||||
</ul>
|
||||
@@ -427,6 +429,13 @@ Some shapes.
|
||||
<div class="section" id="8">
|
||||
<h1><a class="toc-backref" href="#8">Vars</a></h1>
|
||||
<dl class="item">
|
||||
<a id="someVariable"></a>
|
||||
<dt><pre><a href="testproject.html#someVariable"><span class="Identifier">someVariable</span></a><span class="Other">:</span> <span class="Identifier">bool</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
This should be visible.
|
||||
|
||||
</dd>
|
||||
<a id="aVariable"></a>
|
||||
<dt><pre><a href="testproject.html#aVariable"><span class="Identifier">aVariable</span></a><span class="Other">:</span> <span class="Identifier">array</span><span class="Other">[</span><span class="DecNumber">1</span><span class="Other">,</span> <span class="Identifier">int</span><span class="Other">]</span></pre></dt>
|
||||
<dd>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
someVariable testproject.html#someVariable testproject: someVariable
|
||||
C_A testproject.html#C_A testproject: C_A
|
||||
C_B testproject.html#C_B testproject: C_B
|
||||
C_C testproject.html#C_C testproject: C_C
|
||||
|
||||
@@ -244,6 +244,10 @@ function main() {
|
||||
<li><a class="reference external"
|
||||
data-doc-search-tag="utils: someType(): SomeType" href="subdir/subdir_b/utils.html#someType_2">utils: someType(): SomeType</a></li>
|
||||
</ul></dd>
|
||||
<dt><a name="someVariable" href="#someVariable"><span>someVariable:</span></a></dt><dd><ul class="simple">
|
||||
<li><a class="reference external"
|
||||
data-doc-search-tag="testproject: someVariable" href="testproject.html#someVariable">testproject: someVariable</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: testNimDocTrailingExample()" href="testproject.html#testNimDocTrailingExample.t">testproject: testNimDocTrailingExample()</a></li>
|
||||
|
||||
@@ -9,6 +9,9 @@ runnableExamples:
|
||||
# bug #11078
|
||||
for x in "xx": discard
|
||||
|
||||
|
||||
var someVariable*: bool ## This should be visible.
|
||||
|
||||
when true:
|
||||
## top2
|
||||
runnableExamples:
|
||||
|
||||
Reference in New Issue
Block a user