Skip to content

Commit 912886d

Browse files
committed
Add default value to main table, and put into include
1 parent 8f8643d commit 912886d

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

_includes/default-value.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{% if include.val == empty %} Empty array {%endif%}
2+
{% if include.val.first %} Object with properties: <ul>
3+
{% for e in include.val.first %}
4+
<li> {{e[0]}} - {{e[1]}}</li>
5+
{% endfor %}
6+
</ul>
7+
{% elsif include.val %}
8+
{{include.val}}
9+
{% else %}
10+
N/A
11+
{%endif%}

pages/reference.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
<th class="manifest-ref-table">Type</th>
3838
<th class="manifest-ref-table">Description</th>
3939
<th class="manifest-ref-table">Required?</th>
40+
<th class="manifest-ref-table">Default Value</th>
4041
</tr></thead>
4142

4243
<tbody>
@@ -69,6 +70,10 @@
6970
{% include required.html prop=property.first required_list=required_properties %}
7071
</td>
7172

73+
<td class="manifest-ref-table"> <!-- Default Value -->
74+
{% include default-value.html val=property.last.default %}
75+
</td>
76+
7277
</tr>
7378
{% endfor %}
7479

@@ -157,20 +162,16 @@
157162
<!-- Description -->
158163
<td class="manifest-ref-table">{%- include description.html str=property.last.description -%}</td>
159164

160-
<td class="manifest-ref-table"> <!-- Required?
161-
property.first = {{property.first}}
162-
entity.required = {{entity.required}} -->
165+
<!-- Required? -->
166+
<td class="manifest-ref-table">
163167
{% include required.html prop=property.first required_list=entity.required %}
164168
</td>
165169

166-
<td class="manifest-ref-table"> <!-- Default Value -->
167-
{% if property.last.default == empty %} Empty array {%endif%}
168-
{% if property.last.default %}
169-
{{property.last.default}}
170-
{% else %}
171-
N/A
172-
{%endif%}
170+
<!-- Default Value -->
171+
<td class="manifest-ref-table">
172+
{% include default-value.html val=property.last.default %}
173173
</td>
174+
174175
</tr>
175176
{% endfor %}
176177
</tbody></table>

0 commit comments

Comments
 (0)