Skip to content

Commit c1025aa

Browse files
Monkey: Use standard tokens correctly (#3228)
1 parent 5bf6e35 commit c1025aa

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

components/prism-monkey.js

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
Prism.languages.monkey = {
2-
'string': /"[^"\r\n]*"/,
3-
'comment': [
4-
{
5-
pattern: /^#Rem\s[\s\S]*?^#End/im,
6-
greedy: true
7-
},
8-
{
9-
pattern: /'.+/,
10-
greedy: true
11-
}
12-
],
2+
'comment': {
3+
pattern: /^#Rem\s[\s\S]*?^#End|'.+/im,
4+
greedy: true
5+
},
6+
'string': {
7+
pattern: /"[^"\r\n]*"/,
8+
greedy: true,
9+
},
1310
'preprocessor': {
1411
pattern: /(^[ \t]*)#.+/m,
1512
lookbehind: true,
16-
alias: 'comment'
13+
greedy: true,
14+
alias: 'property'
1715
},
16+
1817
'function': /\b\w+(?=\()/,
1918
'type-char': {
20-
pattern: /(\w)[?%#$]/,
21-
lookbehind: true,
22-
alias: 'variable'
19+
pattern: /\b[?%#$]/,
20+
alias: 'class-name'
2321
},
2422
'number': {
2523
pattern: /((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,

components/prism-monkey.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)