l0bsterssg

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

gherkin.js (1162B)


      1 /*
      2  Language: Gherkin
      3  Author: Sam Pikesley (@pikesley) <sam.pikesley@theodi.org>
      4  Description: Gherkin is the format for cucumber specifications. It is a domain specific language which helps you to describe business behavior without the need to go into detail of implementation.
      5  Website: https://cucumber.io/docs/gherkin/
      6  */
      7 
      8 function gherkin (hljs) {
      9   return {
     10     name: 'Gherkin',
     11     aliases: ['feature'],
     12     keywords: 'Feature Background Ability Business\ Need Scenario Scenarios Scenario\ Outline Scenario\ Template Examples Given And Then But When',
     13     contains: [
     14       {
     15         className: 'symbol',
     16         begin: '\\*',
     17         relevance: 0
     18       },
     19       {
     20         className: 'meta',
     21         begin: '@[^@\\s]+'
     22       },
     23       {
     24         begin: '\\|', end: '\\|\\w*$',
     25         contains: [
     26           {
     27             className: 'string',
     28             begin: '[^|]+'
     29           }
     30         ]
     31       },
     32       {
     33         className: 'variable',
     34         begin: '<', end: '>'
     35       },
     36       hljs.HASH_COMMENT_MODE,
     37       {
     38         className: 'string',
     39         begin: '"""', end: '"""'
     40       },
     41       hljs.QUOTE_STRING_MODE
     42     ]
     43   };
     44 }
     45 
     46 module.exports = gherkin;