Skip to content

Commit bb3eb8f

Browse files
committed
fix: manual description comes before member lists
fix #1105
1 parent d505fdf commit bb3eb8f

File tree

15 files changed

+123
-123
lines changed

15 files changed

+123
-123
lines changed

share/mrdocs/addons/generator/adoc/partials/symbol.adoc.hbs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@
2828

2929
{{> symbol/signatures symbol }}
3030
{{/unless}}
31+
{{! Description }}
32+
{{#if symbol.doc.description}}
33+
{{#unless traversing-global-namespace}}
34+
{{#unless (eq (lookup (first symbol.doc.description) "kind") "heading") }}
35+
{{#> markup/dynamic-level-h }}Description{{/markup/dynamic-level-h~}}
36+
{{~/unless}}
37+
{{> doc/block/document symbol.doc.description }}
38+
{{/unless}}
39+
{{/if}}
3140
{{! Base classes }}
3241
{{#if (any_of_by symbol.bases "isPublic")}}
3342
{{#> markup/dynamic-level-h }}Base Classes{{/markup/dynamic-level-h~}}
@@ -126,15 +135,6 @@
126135
{{/each}}
127136
|===
128137

129-
{{/if}}
130-
{{! Description }}
131-
{{#if symbol.doc.description}}
132-
{{#unless traversing-global-namespace}}
133-
{{#unless (eq (lookup (first symbol.doc.description) "kind") "heading") }}
134-
{{#> markup/dynamic-level-h }}Description{{/markup/dynamic-level-h~}}
135-
{{~/unless}}
136-
{{> doc/block/document symbol.doc.description }}
137-
{{/unless}}
138138
{{/if}}
139139
{{! Using symbols }}
140140
{{#if symbol.shadows}}
@@ -244,4 +244,4 @@
244244
{{> symbol symbol=. id=null traversing-global-namespace=true }}
245245
{{/if}}
246246
{{/each}}
247-
{{/if}}
247+
{{/if}}

share/mrdocs/addons/generator/html/partials/symbol.html.hbs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@
3838
{{> symbol/signatures symbol ~}}
3939
</div>
4040
{{/unless}}
41+
{{! Description }}
42+
{{#if symbol.doc.description}}
43+
{{#unless traversing-global-namespace}}
44+
<div>
45+
{{#unless (eq (lookup (first symbol.doc.description) "kind") "heading") }}
46+
{{#> markup/dynamic-level-h level=2 }}Description{{/markup/dynamic-level-h~}}
47+
{{~/unless}}
48+
{{> doc/block/document symbol.doc.description }}
49+
</div>
50+
{{/unless}}
51+
{{/if}}
4152
{{! Base classes }}
4253
{{#if (any_of_by symbol.bases "isPublic")}}
4354
<div>
@@ -171,17 +182,6 @@
171182
</table>
172183
</div>
173184
{{/if}}
174-
{{! Description }}
175-
{{#if symbol.doc.description}}
176-
{{#unless traversing-global-namespace}}
177-
<div>
178-
{{#unless (eq (lookup (first symbol.doc.description) "kind") "heading") }}
179-
{{#> markup/dynamic-level-h level=2 }}Description{{/markup/dynamic-level-h~}}
180-
{{~/unless}}
181-
{{> doc/block/document symbol.doc.description }}
182-
</div>
183-
{{/unless}}
184-
{{/if}}
185185
{{! Using symbols }}
186186
{{#if symbol.shadows}}
187187
<div>

test-files/golden-tests/config/auto-relates/derived.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,10 @@ struct AView2
195195
: link:#AView[AView]
196196
----
197197

198+
=== Description
199+
200+
Used to test indirect derived classes
201+
198202
=== Base Classes
199203

200204
[cols="1,4"]
@@ -223,10 +227,6 @@ struct AView2
223227
| A non&hyphen;member function of ABase
224228
|===
225229

226-
=== Description
227-
228-
Used to test indirect derived classes
229-
230230
[#f1]
231231
== f1
232232

test-files/golden-tests/config/auto-relates/derived.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,11 @@ <h3>
248248
: <a href="#AView">AView</a></code></pre>
249249
</div>
250250
<div>
251+
<h3>
252+
Description</h3>
253+
<p>Used to test indirect derived classes</p>
254+
</div>
255+
<div>
251256
<h2>
252257
Base Classes</h2>
253258
<table>
@@ -283,11 +288,6 @@ <h2>
283288
</tbody>
284289
</table>
285290
</div>
286-
<div>
287-
<h3>
288-
Description</h3>
289-
<p>Used to test indirect derived classes</p>
290-
</div>
291291
</div>
292292
<div>
293293
<div>

test-files/golden-tests/filters/symbol-name/extraction-mode.adoc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ Declared in `&lt;extraction&hyphen;mode&period;cpp&gt;`
9999
struct regular;
100100
----
101101

102+
=== Description
103+
104+
The symbol should have a page as usual
105+
102106
=== Types
103107

104108
[cols="1,4"]
@@ -118,10 +122,6 @@ struct regular;
118122
| A function to get a regular symbol
119123
|===
120124

121-
=== Description
122-
123-
The symbol should have a page as usual
124-
125125
[#regular_ns-regular-also_regular]
126126
== link:#regular_ns[regular&lowbar;ns]::link:#regular_ns-regular[regular]::also&lowbar;regular
127127

@@ -272,6 +272,12 @@ A symbol that passes the see&hyphen;below filter
272272

273273
A see&hyphen;below namespace
274274

275+
=== Description
276+
277+
All member symbols should become see&hyphen;below&period; All members are traversed as see&hyphen;below&period;
278+
279+
The documentation page for these symbols should include the see&hyphen;below comment&period;
280+
275281
=== Types
276282

277283
[cols="1,4"]
@@ -294,12 +300,6 @@ A see&hyphen;below namespace
294300
| A function to get an implementation&hyphen;defined symbol in a see&hyphen;below namespace
295301
|===
296302

297-
=== Description
298-
299-
All member symbols should become see&hyphen;below&period; All members are traversed as see&hyphen;below&period;
300-
301-
The documentation page for these symbols should include the see&hyphen;below comment&period;
302-
303303
[#see_below_ns-regular]
304304
== link:#see_below_ns[see&lowbar;below&lowbar;ns]::regular
305305

@@ -442,6 +442,10 @@ Declared in `&lt;extraction&hyphen;mode&period;cpp&gt;`
442442
struct regular;
443443
----
444444

445+
=== Description
446+
447+
This symbol should have a page as usual&period;
448+
445449
=== Types
446450

447451
[cols="1,4"]
@@ -461,10 +465,6 @@ struct regular;
461465
| A function to get a regular symbol in the global namespace
462466
|===
463467

464-
=== Description
465-
466-
This symbol should have a page as usual&period;
467-
468468
[#regular-also_regular]
469469
== link:#regular[regular]::also&lowbar;regular
470470

test-files/golden-tests/filters/symbol-name/extraction-mode.html

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,11 @@ <h3>
134134
Declared in <code>&lt;extraction-mode.cpp&gt;</code></div>
135135
<pre><code class="source-code cpp">struct regular;</code></pre>
136136
</div>
137+
<div>
138+
<h3>
139+
Description</h3>
140+
<p>The symbol should have a page as usual</p>
141+
</div>
137142
<h2>
138143
Types</h2>
139144
<table style="table-layout: fixed; width: 100%;">
@@ -165,11 +170,6 @@ <h2>
165170
</tbody>
166171
</table>
167172
</div>
168-
<div>
169-
<h3>
170-
Description</h3>
171-
<p>The symbol should have a page as usual</p>
172-
</div>
173173
</div>
174174
<div>
175175
<div>
@@ -239,13 +239,13 @@ <h3>
239239
Declared in <code>&lt;extraction-mode.cpp&gt;</code></div>
240240
<pre><code class="source-code cpp">struct see_below { /* see-below */ };</code></pre>
241241
</div>
242-
243-
244242
<div>
245243
<h3>
246244
Description</h3>
247245
<p>A symbol that passes the filters and the see-below filter. The symbol should have a page as usual but, because it&#x27;s a scope and not a namespace, the members should not be listed on that page.</p>
248246
</div>
247+
248+
249249
</div>
250250
<div>
251251
<div>
@@ -364,6 +364,12 @@ <h2 id="see_below_ns">
364364
<p>A see-below namespace</p>
365365
</div>
366366
</div>
367+
<div>
368+
<h3>
369+
Description</h3>
370+
<p>All member symbols should become see-below. All members are traversed as see-below.</p>
371+
<p>The documentation page for these symbols should include the see-below comment.</p>
372+
</div>
367373
<h2>
368374
Types</h2>
369375
<table style="table-layout: fixed; width: 100%;">
@@ -394,12 +400,6 @@ <h2>
394400
</tbody>
395401
</table>
396402

397-
<div>
398-
<h3>
399-
Description</h3>
400-
<p>All member symbols should become see-below. All members are traversed as see-below.</p>
401-
<p>The documentation page for these symbols should include the see-below comment.</p>
402-
</div>
403403
</div>
404404
<div>
405405
<div>
@@ -417,13 +417,13 @@ <h3>
417417
Declared in <code>&lt;extraction-mode.cpp&gt;</code></div>
418418
<pre><code class="source-code cpp">struct regular { /* see-below */ };</code></pre>
419419
</div>
420-
421-
422420
<div>
423421
<h3>
424422
Description</h3>
425423
<p>The symbol becomes see-below because the whole namespace is see-below.</p>
426424
</div>
425+
426+
427427
</div>
428428
<div>
429429
<div>
@@ -441,13 +441,13 @@ <h3>
441441
Declared in <code>&lt;extraction-mode.cpp&gt;</code></div>
442442
<pre><code class="source-code cpp">struct see_below { /* see-below */ };</code></pre>
443443
</div>
444-
445-
446444
<div>
447445
<h3>
448446
Description</h3>
449447
<p>The symbol becomes see-below because the whole namespace is see-below and because it&#x27;s explicitly marked as see-below.</p>
450448
</div>
449+
450+
451451
</div>
452452
<div>
453453
<div>
@@ -574,6 +574,11 @@ <h3>
574574
Declared in <code>&lt;extraction-mode.cpp&gt;</code></div>
575575
<pre><code class="source-code cpp">struct regular;</code></pre>
576576
</div>
577+
<div>
578+
<h3>
579+
Description</h3>
580+
<p>This symbol should have a page as usual.</p>
581+
</div>
577582
<h2>
578583
Types</h2>
579584
<table style="table-layout: fixed; width: 100%;">
@@ -605,11 +610,6 @@ <h2>
605610
</tbody>
606611
</table>
607612
</div>
608-
<div>
609-
<h3>
610-
Description</h3>
611-
<p>This symbol should have a page as usual.</p>
612-
</div>
613613
</div>
614614
<div>
615615
<div>
@@ -679,14 +679,14 @@ <h3>
679679
Declared in <code>&lt;extraction-mode.cpp&gt;</code></div>
680680
<pre><code class="source-code cpp">struct see_below { /* see-below */ };</code></pre>
681681
</div>
682-
683-
684682
<div>
685683
<h3>
686684
Description</h3>
687685
<p>This symbol should have a page as usual but, because it&#x27;s a scope and not a namespace, the members should not be listed on that page.</p>
688686
<p>The synopsis should say &quot;See below&quot;.</p>
689687
</div>
688+
689+
690690
</div>
691691
<div>
692692
<div>

test-files/golden-tests/javadoc/inline/styled.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ Declared in `&lt;styled&period;cpp&gt;`
2727
struct A;
2828
----
2929

30+
=== Description
31+
32+
Paragraph with `code`, *bold* text, and _italic_ text&period;
33+
34+
We can also escape these markers&colon; &grave;, &ast;, and &lowbar;&period;
35+
3036
=== Member Functions
3137

3238
[cols="1,4"]
@@ -36,12 +42,6 @@ struct A;
3642
| Compare function
3743
|===
3844

39-
=== Description
40-
41-
Paragraph with `code`, *bold* text, and _italic_ text&period;
42-
43-
We can also escape these markers&colon; &grave;, &ast;, and &lowbar;&period;
44-
4545
[#A-compare]
4646
== link:#A[A]::compare
4747

test-files/golden-tests/javadoc/inline/styled.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ <h3>
4343
Declared in <code>&lt;styled.cpp&gt;</code></div>
4444
<pre><code class="source-code cpp">struct A;</code></pre>
4545
</div>
46+
<div>
47+
<h3>
48+
Description</h3>
49+
<p>Paragraph with <code>code</code>, bold text, and italic text.</p>
50+
<p>We can also escape these markers: &#x60;, *, and _.</p>
51+
</div>
4652
<h2>
4753
Member Functions</h2>
4854
<table style="table-layout: fixed; width: 100%;">
@@ -59,12 +65,6 @@ <h2>
5965

6066

6167

62-
<div>
63-
<h3>
64-
Description</h3>
65-
<p>Paragraph with <code>code</code>, bold text, and italic text.</p>
66-
<p>We can also escape these markers: &#x60;, *, and _.</p>
67-
</div>
6868
</div>
6969
<div>
7070
<div>

test-files/golden-tests/javadoc/ref/parent_context.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,13 +141,13 @@ <h3>
141141
Declared in <code>&lt;parent_context.cpp&gt;</code></div>
142142
<pre><code class="source-code cpp">struct runtime_checks;</code></pre>
143143
</div>
144-
145-
146144
<div>
147145
<h3>
148146
Description</h3>
149147
<p>See <a href="#boost-openmethod-final_virtual_ptr-04"><code>final_virtual_ptr</code></a></p>
150148
</div>
149+
150+
151151
</div>
152152
<div>
153153
<div>

0 commit comments

Comments
 (0)