0
This repository has been archived on 2024-08-27. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
highlight_js-rails/vendor/assets/javascripts/highlight_js/languages/handlebars.js
Rogaboru Kujimoshi a52831ccdb Update to 8.0
2014-06-08 21:04:39 +04:00

40 lines
1.0 KiB
JavaScript

/*
Language: Handlebars
Requires: xml.js
Author: Robin Ward <robin.ward@gmail.com>
Description: Matcher for Handlebars as well as EmberJS additions.
*/
function(hljs) {
var EXPRESSION_KEYWORDS = 'each in with if else unless bindattr action collection debugger log outlet template unbound view yield';
return {
aliases: ['hbs', 'html.hbs', 'html.handlebars'],
case_insensitive: true,
subLanguage: 'xml', subLanguageMode: 'continuous',
contains: [
{
className: 'expression',
begin: '{{', end: '}}',
contains: [
{
className: 'begin-block', begin: '\#[a-zA-Z\-\ \.]+',
keywords: EXPRESSION_KEYWORDS
},
{
className: 'string',
begin: '"', end: '"'
},
{
className: 'end-block', begin: '\\\/[a-zA-Z\-\ \.]+',
keywords: EXPRESSION_KEYWORDS
},
{
className: 'variable', begin: '[a-zA-Z\-\.]+',
keywords: EXPRESSION_KEYWORDS
}
]
}
]
};
}