8000 fix function without arguments in scheme language (#1463) · PrismJS/prism@12a827e · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit 12a827e

Browse files
jcubicGolmote
authored andcommitted
fix function without arguments in scheme language (#1463)
* fix function without arguments in scheme language * update tests for scheme
1 parent 2a100db commit 12a827e

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

components/prism-scheme.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Prism.languages.scheme = {
2222
lookbehind: true
2323
},
2424
'function' : {
25-
pattern : /(\()[^\s()]*(?=\s)/,
25+
pattern : /(\()[^\s()]*(?=[\s)])/,
2626
lookbehind : true
2727
},
2828
'punctuation' : /[()]/

components/prism-scheme.min.js

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

tests/languages/scheme/function_feature.test

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
(flmin 2 3)
33
(exact? 2)
44
(inexact->exact 3)
5+
(!fact)
56

67
----------------------------------------------------
78

89
[
910
["punctuation", "("], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", ")"],
1011
["punctuation", "("], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", ")"],
1112
["punctuation", "("], ["function", "exact?"], ["number", "2"], ["punctuation", ")"],
12-
["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"]
13+
["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"],
14+
["punctuation", "("], ["function", "!fact"], ["punctuation", ")"]
1315
]
1416

1517
----------------------------------------------------
1618

17-
Checks for functions.
19+
Checks for functions.

0 commit comments

Comments
 (0)
0