Skip to content

Commit

Permalink
Wolfram: Removed unmatchable punctuation variant (#3133)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Oct 5, 2021
1 parent 91060fd commit a28a86a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/prism-wolfram.js
Expand Up @@ -7,7 +7,7 @@ Prism.languages.wolfram = {
},
'keyword': /\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,
'context': {
pattern: /\w+`+\w*/,
pattern: /\b\w+`+\w*/,
alias: 'class-name'
},
'blank': {
Expand All @@ -21,7 +21,7 @@ Prism.languages.wolfram = {
'boolean': /\b(?:False|True)\b/,
'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,
'operator': /\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
'punctuation': /[\|{}[\];(),.:]/
'punctuation': /[{}[\];(),.:]/
};

Prism.languages.mathematica = Prism.languages.wolfram;
Expand Down
2 changes: 1 addition & 1 deletion components/prism-wolfram.min.js

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

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

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

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

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

0 comments on commit a28a86a

Please sign in to comment.