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/erb.js
2015-01-25 16:00:01 +01:00

27 lines
595 B
JavaScript

/*
Language: ERB (Embedded Ruby)
Requires: xml.js, ruby.js
Author: Lucas Mazza <lucastmazza@gmail.com>
Contributors: Kassio Borges <kassioborgesm@gmail.com>
Description: "Bridge" language defining fragments of Ruby in HTML within <% .. %>
Category: template
*/
function(hljs) {
return {
subLanguage: 'xml', subLanguageMode: 'continuous',
contains: [
{
className: 'comment',
begin: '<%#', end: '%>',
},
{
begin: '<%[%=-]?', end: '[%-]?%>',
subLanguage: 'ruby',
excludeBegin: true,
excludeEnd: true
}
]
};
}