Skip to content

Commit

Permalink
fix function without arguments in scheme language (#1463)
Browse files Browse the repository at this point in the history
* fix function without arguments in scheme language

* update tests for scheme
  • Loading branch information
jcubic authored and Golmote committed Jul 7, 2018
1 parent 2a100db commit 12a827e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/prism-scheme.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Prism.languages.scheme = {
lookbehind: true
},
'function' : {
pattern : /(\()[^\s()]*(?=\s)/,
pattern : /(\()[^\s()]*(?=[\s)])/,
lookbehind : true
},
'punctuation' : /[()]/
Expand Down
2 changes: 1 addition & 1 deletion components/prism-scheme.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions tests/languages/scheme/function_feature.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@
(flmin 2 3)
(exact? 2)
(inexact->exact 3)
(!fact)

----------------------------------------------------

[
["punctuation", "("], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", ")"],
["punctuation", "("], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", ")"],
["punctuation", "("], ["function", "exact?"], ["number", "2"], ["punctuation", ")"],
["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"]
["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"],
["punctuation", "("], ["function", "!fact"], ["punctuation", ")"]
]

----------------------------------------------------

Checks for functions.
Checks for functions.

0 comments on commit 12a827e

Please sign in to comment.