Skip to content

Commit 7f47140

Browse files
committed
Monkey: Don't use captures if not needed
1 parent 4cd4f01 commit 7f47140

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/prism-monkey.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Prism.languages.monkey = {
22
'string': /"[^"\r\n]*"/,
33
'comment': [
44
/^#Rem\s+[\s\S]*?^#End/im,
5-
/'.+/,
5+
/'.+/
66
],
77
'preprocessor': {
88
pattern: /(^[ \t]*)#.+/m,
@@ -16,7 +16,7 @@ Prism.languages.monkey = {
1616
alias: 'variable'
1717
},
1818
'number': {
19-
pattern: /((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+((?!\.\.)\.\d*)?|\$[\da-f]+)/i,
19+
pattern: /((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,
2020
lookbehind: true
2121
},
2222
'keyword': /\b(?:Void|Strict|Public|Private|Property|Bool|Int|Float|String|Array|Object|Continue|Exit|Import|Extern|New|Self|Super|Try|Catch|Eachin|True|False|Extends|Abstract|Final|Select|Case|Default|Const|Local|Global|Field|Method|Function|Class|End|If|Then|Else|ElseIf|EndIf|While|Wend|Repeat|Until|Forever|For|To|Step|Next|Return|Module|Interface|Implements|Inline|Throw|Null)\b/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)