]> luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/subunit.js
Initial commit.
[flow-web.git] / static / highlight / languages / subunit.js
1 /*! `subunit` grammar compiled for Highlight.js 11.11.1 */
2 (function(){
3 var hljsGrammar = (function () {
4 'use strict';
5
6 /*
7 Language: SubUnit
8 Author: Sergey Bronnikov <sergeyb@bronevichok.ru>
9 Website: https://pypi.org/project/python-subunit/
10 Category: protocols
11 */
12
13 function subunit(hljs) {
14 const DETAILS = {
15 className: 'string',
16 begin: '\\[\n(multipart)?',
17 end: '\\]\n'
18 };
19 const TIME = {
20 className: 'string',
21 begin: '\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}\.\\d+Z'
22 };
23 const PROGRESSVALUE = {
24 className: 'string',
25 begin: '(\\+|-)\\d+'
26 };
27 const KEYWORDS = {
28 className: 'keyword',
29 relevance: 10,
30 variants: [
31 { begin: '^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?' },
32 { begin: '^progress(:?)(\\s+)?(pop|push)?' },
33 { begin: '^tags:' },
34 { begin: '^time:' }
35 ]
36 };
37 return {
38 name: 'SubUnit',
39 case_insensitive: true,
40 contains: [
41 DETAILS,
42 TIME,
43 PROGRESSVALUE,
44 KEYWORDS
45 ]
46 };
47 }
48
49 return subunit;
50
51 })();
52
53 hljs.registerLanguage('subunit', hljsGrammar);
54 })();