This repository has been archived by the owner on Feb 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Also render examples with a body field
- Loading branch information
Martijn Jacobs
committed
Oct 18, 2019
1 parent
5784927
commit ca8f1e1
Showing
2 changed files
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
{% for field in fields %} | ||
{% if field.examples %} | ||
<h4>Examples</h4> | ||
<p>parameter: <code>{{ field.name }}</code> | ||
<table class="parameters table table-bordered table-striped"> | ||
<thead> | ||
<tr><th>Name</th><th>Value</th><th>Summary</th></tr> | ||
</thead> | ||
<tbody> | ||
{% for name, example in field.examples.items() %} | ||
<tr> | ||
<td>{{ name }}</td> | ||
<td ><code>{{ example.value|pprint }}</code></td> | ||
<td>{% if example.summary %}{{ example.summary }}{% endif %}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endif %} | ||
{% endfor %} | ||
{% if examples %} | ||
<h4>Examples</h4> | ||
<p>parameter: <code>{{ field.name }}</code> | ||
<table class="parameters table table-bordered table-striped"> | ||
<thead> | ||
<tr><th>Name</th><th>Value</th><th>Summary</th></tr> | ||
</thead> | ||
<tbody> | ||
{% for name, example in examples.items() %} | ||
<tr> | ||
<td>{{ name }}</td> | ||
<td ><code>{{ example.value|pprint }}</code></td> | ||
<td>{% if example.summary %}{{ example.summary }}{% endif %}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters