mindoc/static/editor.md/lib/highlight/languages/gherkin.js
lifei6671 327d6fb8d8 feat:1、修复无数据时报错的问题。
2、新增自定义代码着色格式
3、新增自动加载配置文件
2018-08-07 17:19:56 +08:00

43 lines
901 B
JavaScript

/*
Language: Gherkin
Author: Sam Pikesley (@pikesley) <sam.pikesley@theodi.org>
Description: Gherkin (Cucumber etc)
*/
function (hljs) {
return {
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]+'
},
{
begin: '\\|', end: '\\|\\w*$',
contains: [
{
className: 'string',
begin: '[^|]+'
}
]
},
{
className: 'variable',
begin: '<', end: '>'
},
hljs.HASH_COMMENT_MODE,
{
className: 'string',
begin: '"""', end: '"""'
},
hljs.QUOTE_STRING_MODE
]
};
}