Skip to content

Commit

Permalink
Merge branch 'master' into move-quadratic
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Jun 8, 2021
2 parents 9d8a875 + fc2a333 commit b2a63e9
Show file tree
Hide file tree
Showing 19 changed files with 233 additions and 52 deletions.
2 changes: 1 addition & 1 deletion components.js

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions components.json
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,15 @@
"require": "markup",
"owner": "Golmote"
},
"wolfram": {
"title": "Wolfram language",
"alias": ["mathematica", "nb", "wl"],
"aliasTitles": {
"mathematica": "Mathematica",
"nb": "Mathematica Notebook"
},
"owner": "msollami"
},
"xeora": {
"title": "Xeora",
"require": "markup",
Expand Down
6 changes: 5 additions & 1 deletion components/prism-autohotkey.js

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

2 changes: 1 addition & 1 deletion components/prism-autohotkey.min.js

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions components/prism-wolfram.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Prism.languages.wolfram = {
'comment': // Allow one level of nesting - note: regex taken from applescipt
/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,
'string': {
pattern: /"(?:\\.|[^"\\\r\n])*"/,
greedy: true
},
'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*/,
alias: 'class-name'
},
'blank': {
pattern: /\b\w+_\b/,
alias: 'regex'
},
'global-variable': {
pattern: /\$\w+/,
alias: 'variable'
},
'boolean': /\b(?:True|False)\b/,
'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,
'operator': /\/\.|\;|\=\.|\^\=|\^\:\=|\:\=|\<\<|\>\>|\<\||\|\>|\:\>|\|\-\>|\-\>|\<\-|\@\@\@|\@\@|\@|\/\@|\=\!\=|\=\=\=|\=\=|\=|\+|\-|\^|\*|\[\/-+%=]=?|\!\=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
'punctuation': /[\|{}[\];(),.:]/
};

Prism.languages.mathematica = Prism.languages.wolfram;
Prism.languages.wl = Prism.languages.wolfram;
Prism.languages.nb = Prism.languages.wolfram;
1 change: 1 addition & 0 deletions components/prism-wolfram.min.js

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

31 changes: 31 additions & 0 deletions examples/prism-wolfram.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<h2>Comments</h2>
<pre><code>
(* This is a comment *)
</code></pre>

<h2>Strings</h2>
<pre><code>
"foo bar baz"
</code></pre>

<h2>Numbers</h2>
<pre><code>
7
3.14
10.
.001
1e100
3.14e-10
2147483647
</code></pre>

<h2>Full example</h2>
<pre><code>
(* Most operators are supported *)
f /@ {1, 2, 3};
f @@ Range[10];
f @@@ y;
Module[{x=1},
Return @ $Failed
]
</code></pre>
62 changes: 24 additions & 38 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"jsdom": "^13.0.0",
"mocha": "^6.2.0",
"pump": "^3.0.0",
"refa": "^0.7.0",
"regexpp": "^2.0.1",
"scslre": "^0.1.1",
"refa": "^0.8.0",
"regexpp": "^3.1.0",
"scslre": "^0.1.3",
"simple-git": "^1.107.0",
"webfont": "^9.0.0",
"yargs": "^13.2.2"
Expand Down
3 changes: 3 additions & 0 deletions plugins/autoloader/prism-autoloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@
"url": "uri",
"vb": "visual-basic",
"vba": "visual-basic",
"mathematica": "wolfram",
"nb": "wolfram",
"wl": "wolfram",
"xeoracube": "xeora",
"yml": "yaml"
}/*]*/;
Expand Down
2 changes: 1 addition & 1 deletion plugins/autoloader/prism-autoloader.min.js

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

3 changes: 3 additions & 0 deletions plugins/show-language/prism-show-language.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@
"vb": "Visual Basic",
"wasm": "WebAssembly",
"wiki": "Wiki markup",
"wolfram": "Wolfram language",
"nb": "Mathematica Notebook",
"wl": "Wolfram language",
"xeoracube": "XeoraCube",
"xml-doc": "XML doc (.net)",
"xojo": "Xojo (REALbasic)",
Expand Down
Loading

0 comments on commit b2a63e9

Please sign in to comment.