l0bsterssg

node.js static responsive blog post generator
Log | Files | Refs | README

subunit.js (915B)


      1 /*
      2 Language: SubUnit
      3 Author: Sergey Bronnikov <sergeyb@bronevichok.ru>
      4 Website: https://pypi.org/project/python-subunit/
      5 */
      6 
      7 function subunit(hljs) {
      8   var DETAILS = {
      9     className: 'string',
     10     begin: '\\[\n(multipart)?', end: '\\]\n'
     11   };
     12   var TIME = {
     13     className: 'string',
     14     begin: '\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}\.\\d+Z'
     15   };
     16   var PROGRESSVALUE = {
     17     className: 'string',
     18     begin: '(\\+|-)\\d+'
     19   };
     20   var KEYWORDS = {
     21     className: 'keyword',
     22     relevance: 10,
     23     variants: [
     24       { begin: '^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?' },
     25       { begin: '^progress(:?)(\\s+)?(pop|push)?' },
     26       { begin: '^tags:' },
     27       { begin: '^time:' }
     28     ],
     29   };
     30   return {
     31     name: 'SubUnit',
     32     case_insensitive: true,
     33     contains: [
     34       DETAILS,
     35       TIME,
     36       PROGRESSVALUE,
     37       KEYWORDS
     38     ]
     39   };
     40 }
     41 
     42 module.exports = subunit;