Add support for examples in API description section

This commit is contained in:
David Rowe 2019-08-27 08:46:03 +12:00
parent fff2a15960
commit 233a1528df

View file

@ -92,7 +92,13 @@
</tr>
</tbody>
</table>
<?js= self.partial('details.tmpl', doc) ?>
<?js= self.partial('details.tmpl', doc) ?>
<?js if (doc.examples && doc.examples.length) { ?>
<h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
<?js= self.partial('examples.tmpl', doc.examples) ?>
<?js } ?>
<?js } else { ?>
<h3>Description</h3>