1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/highlight.js/lib/languages/erb.js

30 lines
661 B
JavaScript
Raw Normal View History

2024-01-16 21:26:16 +08:00
/*
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) {
2023-12-18 13:12:25 +08:00
return {
2024-01-16 21:26:16 +08:00
name: 'ERB',
2023-12-18 13:12:25 +08:00
subLanguage: 'xml',
contains: [
hljs.COMMENT('<%#', '%>'),
{
2024-01-16 21:26:16 +08:00
begin: '<%[%=-]?',
end: '[%-]?%>',
2023-12-18 13:12:25 +08:00
subLanguage: 'ruby',
excludeBegin: true,
excludeEnd: true
}
]
};
2024-01-16 21:26:16 +08:00
}
module.exports = erb;