initi.doc/templates/initi/tmpl/examples.tmpl

14 lines
326 B
Cheetah

<?js
var data = obj;
var self = this;
data.forEach(function(example) {
var result = self.htmlsafe(example.code);
if (example.caption) {
?>
<p class="code-caption"><?js= example.caption ?></p>
<?js } ?>
<pre class="prettyprint"><code><?js= result ?></code></pre>
<?js
});
?>