l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

erb.js (629B)


      1 /*
      2 Language: ERB (Embedded Ruby)
      3 Requires: xml.js, ruby.js
      4 Author: Lucas Mazza <lucastmazza@gmail.com>
      5 Contributors: Kassio Borges <kassioborgesm@gmail.com>
      6 Description: "Bridge" language defining fragments of Ruby in HTML within <% .. %>
      7 Website: https://ruby-doc.org/stdlib-2.6.5/libdoc/erb/rdoc/ERB.html
      8 Category: template
      9 */
     10 
     11 function erb(hljs) {
     12   return {
     13     name: 'ERB',
     14     subLanguage: 'xml',
     15     contains: [
     16       hljs.COMMENT('<%#', '%>'),
     17       {
     18         begin: '<%[%=-]?', end: '[%-]?%>',
     19         subLanguage: 'ruby',
     20         excludeBegin: true,
     21         excludeEnd: true
     22       }
     23     ]
     24   };
     25 }
     26 
     27 module.exports = erb;