UNPKG

1.19 kBJavaScriptView Raw
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
8function 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: '\\|',
25 end: '\\|\\w*$',
26 contains: [
27 {
28 className: 'string',
29 begin: '[^|]+'
30 }
31 ]
32 },
33 {
34 className: 'variable',
35 begin: '<',
36 end: '>'
37 },
38 hljs.HASH_COMMENT_MODE,
39 {
40 className: 'string',
41 begin: '"""',
42 end: '"""'
43 },
44 hljs.QUOTE_STRING_MODE
45 ]
46 };
47}
48
49export { gherkin as default };