Hash :
27ec928b
Author :
Date :
2014-12-23T08:53:56
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
<h1>Handlebars</h1>
<p>To use this language, use the class "language-handlebars".</p>
<h2>Comments</h2>
<pre><code>{{! This is a comment with <p>some markup</p> in it }}</code></pre>
<h2>Variables</h2>
<pre><code><p>{{ text }}</p>
<h1>{{article.title}}</h1>
{{{ triple_slash_is_supported }}}
{{articles.[10].[#comments]}}</code></pre>
<h2>Strings, numbers and booleans</h2>
<pre><code>{{{link "See more..." story.url}}}
{{ true }}
{{ custom_helper 42 href="somepage.html" false }}</code></pre>
<h2>Block helpers</h2>
<pre><code><div class="body">
{{#bold}}{{body}}{{/bold}}
</div>
{{#with story}}
<div class="intro">{{{intro}}}</div>
<div class="body">{{{body}}}</div>
{{/with}}
<div class="{{#if test}}foo{{else}}bar{{/if}}"></div>
{{#list array}}
{{@index}}. {{title}}
{{/list}}</code></pre>
<h2>Known failures</h2>
<p>There are certain edge cases where Prism will fail.
There are always such cases in every regex-based syntax highlighter.
However, Prism dares to be open and honest about them.
If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
</p>
<h3>Handlebars tag in the middle of an HTML tag</h3>
<pre><code><div{{#if test}} class="test"{{/if}}></div></code></pre>