# Handlebars

To use this language, use the class "language-handlebars".

## Comments

    {{! This is a comment with <p>some markup</p> in it }}
    {{! This is a comment }} {{ this_is_not }}

## Variables

    <p>{{ text }}</p>
    <h1>{{article.title}}</h1>
    {{{ triple_stash_is_supported }}}
    {{articles.[10].[#comments]}}

## Strings, numbers and booleans

    {{{link "See more..." story.url}}}
    {{ true }}
    {{ custom_helper 42 href="somepage.html" false }}

## Block helpers

    <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}}
    {{#block-with-hyphens args=yep}}
    	This should probably work...
    {{/block-with-hyphens}}

## Known failures

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.

### Handlebars tag in the middle of an HTML tag

    <div{{#if test}} class="test"{{/if}}></div>