1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/highlight.js/lib/languages/gherkin.js

50 lines
1.2 KiB
JavaScript
Raw Normal View History

2024-01-16 21:26:16 +08:00
/*
Language: Gherkin
Author: Sam Pikesley (@pikesley) <sam.pikesley@theodi.org>
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.
Website: https://cucumber.io/docs/gherkin/
*/
function gherkin(hljs) {
2023-12-18 13:12:25 +08:00
return {
2024-01-16 21:26:16 +08:00
name: 'Gherkin',
2023-12-18 13:12:25 +08:00
aliases: ['feature'],
keywords: 'Feature Background Ability Business\ Need Scenario Scenarios Scenario\ Outline Scenario\ Template Examples Given And Then But When',
contains: [
{
className: 'symbol',
begin: '\\*',
relevance: 0
},
{
className: 'meta',
begin: '@[^@\\s]+'
},
{
2024-01-16 21:26:16 +08:00
begin: '\\|',
end: '\\|\\w*$',
2023-12-18 13:12:25 +08:00
contains: [
{
className: 'string',
begin: '[^|]+'
}
]
},
{
className: 'variable',
2024-01-16 21:26:16 +08:00
begin: '<',
end: '>'
2023-12-18 13:12:25 +08:00
},
hljs.HASH_COMMENT_MODE,
{
className: 'string',
2024-01-16 21:26:16 +08:00
begin: '"""',
end: '"""'
2023-12-18 13:12:25 +08:00
},
hljs.QUOTE_STRING_MODE
]
};
2024-01-16 21:26:16 +08:00
}
module.exports = gherkin;