You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
661 B
30 lines
661 B
4 weeks ago
|
/*
|
||
|
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 <% .. %>
|
||
|
Website: https://ruby-doc.org/stdlib-2.6.5/libdoc/erb/rdoc/ERB.html
|
||
|
Category: template
|
||
|
*/
|
||
|
|
||
|
/** @type LanguageFn */
|
||
|
function erb(hljs) {
|
||
|
return {
|
||
|
name: 'ERB',
|
||
|
subLanguage: 'xml',
|
||
|
contains: [
|
||
|
hljs.COMMENT('<%#', '%>'),
|
||
|
{
|
||
|
begin: '<%[%=-]?',
|
||
|
end: '[%-]?%>',
|
||
|
subLanguage: 'ruby',
|
||
|
excludeBegin: true,
|
||
|
excludeEnd: true
|
||
|
}
|
||
|
]
|
||
|
};
|
||
|
}
|
||
|
|
||
|
module.exports = erb;
|