Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Ocaml: Removed unmatchable punctuation variant (#3120)
  • Loading branch information
RunDevelopment committed Oct 5, 2021
1 parent eeb1399 commit 314d699
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/prism-ocaml.js
Expand Up @@ -37,5 +37,5 @@ Prism.languages.ocaml = {
'boolean': /\b(?:false|true)\b/,
// Custom operators are allowed
'operator': /:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,
'punctuation': /[(){}\[\]|.,:;]|\b_\b/
'punctuation': /[(){}\[\].,:;]|\b_\b/
};
2 changes: 1 addition & 1 deletion components/prism-ocaml.min.js

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

21 changes: 21 additions & 0 deletions tests/languages/ocaml/punctuation_feature.test
@@ -0,0 +1,21 @@
( ) { } [ ]
. , : ;
_

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

[
["punctuation", "("],
["punctuation", ")"],
["punctuation", "{"],
["punctuation", "}"],
["punctuation", "["],
["punctuation", "]"],

["punctuation", "."],
["punctuation", ","],
["punctuation", ":"],
["punctuation", ";"],

["punctuation", "_"]
]

0 comments on commit 314d699

Please sign in to comment.