mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-12-21 19:29:53 +08:00
搭建框架
This commit is contained in:
42
static/highlight/languages/tap.js
Normal file
42
static/highlight/languages/tap.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
Language: Test Anything Protocol
|
||||
Requires: yaml.js
|
||||
Author: Sergey Bronnikov <sergeyb@bronevichok.ru>
|
||||
Website: https://bronevichok.ru/
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
return {
|
||||
case_insensitive: true,
|
||||
contains: [
|
||||
hljs.HASH_COMMENT_MODE,
|
||||
// version of format and total amount of testcases
|
||||
{
|
||||
className: 'meta',
|
||||
variants: [
|
||||
{ begin: '^TAP version (\\d+)$' },
|
||||
{ begin: '^1\\.\\.(\\d+)$' }
|
||||
],
|
||||
},
|
||||
// YAML block
|
||||
{
|
||||
begin: '(\s+)?---$', end: '\\.\\.\\.$',
|
||||
subLanguage: 'yaml',
|
||||
relevance: 0
|
||||
},
|
||||
// testcase number
|
||||
{
|
||||
className: 'number',
|
||||
begin: ' (\\d+) '
|
||||
},
|
||||
// testcase status and description
|
||||
{
|
||||
className: 'symbol',
|
||||
variants: [
|
||||
{ begin: '^ok' },
|
||||
{ begin: '^not ok' }
|
||||
],
|
||||
},
|
||||
]
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user