-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbrush.js
44 lines (42 loc) · 945 Bytes
/
brush.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
var BrushBase = require('brush-base');
var regexLib = require('syntaxhighlighter-regex').commonRegExp;
function Brush() {
// Contributed by Chad Granum
this.regexList = [
{
regex: new RegExp('^1..\\d+', 'gm'),
css: 'plain bold italic'
},
{
regex: new RegExp('^ok( \\d+)?', 'gm'),
css: 'keyword'
},
{
regex: new RegExp('^not ok( \\d+)?', 'gm'),
css: 'color3 bold'
},
{
regex: new RegExp('(?!^\\s*)#.*$', 'gm'),
css: 'variable bold'
},
{
regex: new RegExp('^#.*$', 'gm'),
css: 'comments bold'
},
{
regex: new RegExp('^(?!(not )?ok)[^1].*$', 'gm'),
css: 'comments'
},
{
regex: regexLib.doubleQuotedString,
css: 'string'
},
{
regex: regexLib.singleQuotedString,
css: 'string'
},
];
}
Brush.prototype = new BrushBase();
Brush.aliases = ['tap', 'Tap', 'TAP'];
module.exports = Brush;