Skip to content

Commit 0e36580

Browse files
committed
fix: tables have no enumerator anchors
1 parent bcd8372 commit 0e36580

File tree

4 files changed

+35
-20
lines changed

4 files changed

+35
-20
lines changed

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

+7-4
Original file line numberDiff line numberDiff line change
@@ -45,20 +45,23 @@
4545
{{>symbol/tranche tranche=symbol.interface label="" is-namespace=true}}
4646

4747
{{/if}}
48-
{{else if symbol.members}}
48+
{{else if (and symbol.members (ne symbol.kind "overloads"))}}
4949
{{! Members }}
50-
{{#if (and symbol.members (ne symbol.kind "overloads"))}}
5150
{{#> markup/dynamic-level-h }}Members{{/markup/dynamic-level-h}}
5251

5352
[,cols=2]
5453
|===
5554
|Name |Description
5655
{{#each symbol.members}}
57-
|xref:{{{anchor}}}[`pass:v[{{>symbol/name . nolink=true}}]`] | {{~doc.brief}}
56+
{{#if (ne kind "enumerator")}}
57+
|xref:{{{anchor}}}[`{{>symbol/name . nolink=true}}`]
58+
{{else}}
59+
|`{{>symbol/name . nolink=true}}`
60+
{{/if}}
61+
|{{~doc.brief}}
5862
{{/each}}
5963
|===
6064

61-
{{/if}}
6265
{{/if}}
6366
{{! Using directives }}
6467
{{#if symbol.usingDirectives}}

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

+4
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@
6767
<tbody>
6868
{{#each symbol.members}}
6969
<tr>
70+
{{#if (ne kind "enumerator")}}
7071
<td><a href="#{{anchor}}">{{>symbol/name . nolink=true}}</a></td>
72+
{{else}}
73+
<td>{{>symbol/name . nolink=true}}</td>
74+
{{/if}}
7175
<td>{{{doc.brief}}}</td>
7276
</tr>
7377
{{/each}}

test-files/golden-tests/enum.adoc

+16-8
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ enum E0;
4747
[,cols=2]
4848
|===
4949
|Name |Description
50-
|xref:E0-e0[`pass:v[e0]`] |pass:[
50+
|`e0`
51+
|pass:[
5152
e0 brief.
5253
]
53-
|xref:E0-e1[`pass:v[e1]`] |pass:[
54+
|`e1`
55+
|pass:[
5456
e1 brief.
5557
]
5658
|===
@@ -119,8 +121,10 @@ enum E1 : char;
119121
[,cols=2]
120122
|===
121123
|Name |Description
122-
|xref:E1-e2[`pass:v[e2]`] |
123-
|xref:E1-e3[`pass:v[e3]`] |
124+
|`e2`
125+
|
126+
|`e3`
127+
|
124128
|===
125129

126130
[#E1-e2]
@@ -165,10 +169,12 @@ enum E2 : int;
165169
[,cols=2]
166170
|===
167171
|Name |Description
168-
|xref:E2-e4[`pass:v[e4]`] |pass:[
172+
|`e4`
173+
|pass:[
169174
e4 brief.
170175
]
171-
|xref:E2-e5[`pass:v[e5]`] |pass:[
176+
|`e5`
177+
|pass:[
172178
e5 brief.
173179
]
174180
|===
@@ -237,8 +243,10 @@ enum E3 : char;
237243
[,cols=2]
238244
|===
239245
|Name |Description
240-
|xref:E3-e6[`pass:v[e6]`] |
241-
|xref:E3-e7[`pass:v[e7]`] |
246+
|`e6`
247+
|
248+
|`e7`
249+
|
242250
|===
243251

244252
[#E3-e6]

test-files/golden-tests/enum.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ <h3>Members</h3>
6464
</thead>
6565
<tbody>
6666
<tr>
67-
<td><a href="#E0-e0">e0</a></td>
67+
<td>e0</td>
6868
<td><p><span>e0 brief.</span></p>
6969

7070
</td>
7171
</tr>
7272
<tr>
73-
<td><a href="#E0-e1">e1</a></td>
73+
<td>e1</td>
7474
<td><p><span>e1 brief.</span></p>
7575

7676
</td>
@@ -167,11 +167,11 @@ <h3>Members</h3>
167167
</thead>
168168
<tbody>
169169
<tr>
170-
<td><a href="#E1-e2">e2</a></td>
170+
<td>e2</td>
171171
<td></td>
172172
</tr>
173173
<tr>
174-
<td><a href="#E1-e3">e3</a></td>
174+
<td>e3</td>
175175
<td></td>
176176
</tr>
177177
</tbody>
@@ -239,13 +239,13 @@ <h3>Members</h3>
239239
</thead>
240240
<tbody>
241241
<tr>
242-
<td><a href="#E2-e4">e4</a></td>
242+
<td>e4</td>
243243
<td><p><span>e4 brief.</span></p>
244244

245245
</td>
246246
</tr>
247247
<tr>
248-
<td><a href="#E2-e5">e5</a></td>
248+
<td>e5</td>
249249
<td><p><span>e5 brief.</span></p>
250250

251251
</td>
@@ -342,11 +342,11 @@ <h3>Members</h3>
342342
</thead>
343343
<tbody>
344344
<tr>
345-
<td><a href="#E3-e6">e6</a></td>
345+
<td>e6</td>
346346
<td></td>
347347
</tr>
348348
<tr>
349-
<td><a href="#E3-e7">e7</a></td>
349+
<td>e7</td>
350350
<td></td>
351351
</tr>
352352
</tbody>

0 commit comments

Comments
 (0)