2024-01-16 21:26:16 +08:00
|
|
|
/*
|
|
|
|
Language: Mojolicious
|
|
|
|
Requires: xml.js, perl.js
|
|
|
|
Author: Dotan Dimet <dotan@corky.net>
|
|
|
|
Description: Mojolicious .ep (Embedded Perl) templates
|
|
|
|
Website: https://mojolicious.org
|
|
|
|
Category: template
|
|
|
|
*/
|
|
|
|
function mojolicious(hljs) {
|
2023-12-18 13:12:25 +08:00
|
|
|
return {
|
2024-01-16 21:26:16 +08:00
|
|
|
name: 'Mojolicious',
|
2023-12-18 13:12:25 +08:00
|
|
|
subLanguage: 'xml',
|
|
|
|
contains: [
|
|
|
|
{
|
|
|
|
className: 'meta',
|
|
|
|
begin: '^__(END|DATA)__$'
|
|
|
|
},
|
2024-01-16 21:26:16 +08:00
|
|
|
// mojolicious line
|
2023-12-18 13:12:25 +08:00
|
|
|
{
|
2024-01-16 21:26:16 +08:00
|
|
|
begin: "^\\s*%{1,2}={0,2}",
|
|
|
|
end: '$',
|
2023-12-18 13:12:25 +08:00
|
|
|
subLanguage: 'perl'
|
|
|
|
},
|
2024-01-16 21:26:16 +08:00
|
|
|
// mojolicious block
|
2023-12-18 13:12:25 +08:00
|
|
|
{
|
|
|
|
begin: "<%{1,2}={0,2}",
|
|
|
|
end: "={0,1}%>",
|
|
|
|
subLanguage: 'perl',
|
|
|
|
excludeBegin: true,
|
|
|
|
excludeEnd: true
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
2024-01-16 21:26:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = mojolicious;
|