main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
741 bytes
|
Line | |
---|
1 | 'use strict'
|
---|
2 | var refractorYaml = require('./yaml.js')
|
---|
3 | module.exports = tap
|
---|
4 | tap.displayName = 'tap'
|
---|
5 | tap.aliases = []
|
---|
6 | function tap(Prism) {
|
---|
7 | Prism.register(refractorYaml)
|
---|
8 | // https://en.wikipedia.org/wiki/Test_Anything_Protocol
|
---|
9 | Prism.languages.tap = {
|
---|
10 | fail: /not ok[^#{\n\r]*/,
|
---|
11 | pass: /ok[^#{\n\r]*/,
|
---|
12 | pragma: /pragma [+-][a-z]+/,
|
---|
13 | bailout: /bail out!.*/i,
|
---|
14 | version: /TAP version \d+/i,
|
---|
15 | plan: /\b\d+\.\.\d+(?: +#.*)?/,
|
---|
16 | subtest: {
|
---|
17 | pattern: /# Subtest(?:: .*)?/,
|
---|
18 | greedy: true
|
---|
19 | },
|
---|
20 | punctuation: /[{}]/,
|
---|
21 | directive: /#.*/,
|
---|
22 | yamlish: {
|
---|
23 | pattern: /(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,
|
---|
24 | lookbehind: true,
|
---|
25 | inside: Prism.languages.yaml,
|
---|
26 | alias: 'language-yaml'
|
---|
27 | }
|
---|
28 | }
|
---|
29 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.