mojolicious.js 733 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. Language: Mojolicious
  3. Requires: xml.js, perl.js
  4. Author: Dotan Dimet <dotan@corky.net>
  5. Description: Mojolicious .ep (Embedded Perl) templates
  6. Website: https://mojolicious.org
  7. Category: template
  8. */
  9. function mojolicious(hljs) {
  10. return {
  11. name: 'Mojolicious',
  12. subLanguage: 'xml',
  13. contains: [
  14. {
  15. className: 'meta',
  16. begin: '^__(END|DATA)__$'
  17. },
  18. // mojolicious line
  19. {
  20. begin: "^\\s*%{1,2}={0,2}",
  21. end: '$',
  22. subLanguage: 'perl'
  23. },
  24. // mojolicious block
  25. {
  26. begin: "<%{1,2}={0,2}",
  27. end: "={0,1}%>",
  28. subLanguage: 'perl',
  29. excludeBegin: true,
  30. excludeEnd: true
  31. }
  32. ]
  33. };
  34. }
  35. module.exports = mojolicious;