Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Maxscript: Fixed booleans not being highlighted (#3134)
  • Loading branch information
RunDevelopment committed Oct 5, 2021
1 parent a28a86a commit c6574e6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/prism-maxscript.js
Expand Up @@ -25,7 +25,7 @@ Prism.languages.maxscript = {
alias: 'attr-name'
},

'keyword': /\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i,
'keyword': /\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i,
'boolean': /\b(?:false|off|on|true)\b/,

'time': {
Expand Down
2 changes: 1 addition & 1 deletion components/prism-maxscript.min.js

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

4 changes: 3 additions & 1 deletion tests/languages/maxscript/boolean_feature.test
@@ -1,7 +1,9 @@
true false
on off

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

[
["boolean", "true"], ["boolean", "false"]
["boolean", "true"], ["boolean", "false"],
["boolean", "on"], ["boolean", "off"]
]
4 changes: 0 additions & 4 deletions tests/languages/maxscript/keyword_feature.test
Expand Up @@ -26,8 +26,6 @@ mapped;
max;
not;
of;
off;
on;
or;
parameters;
persistent;
Expand Down Expand Up @@ -80,8 +78,6 @@ with;
["keyword", "max"], ["punctuation", ";"],
["keyword", "not"], ["punctuation", ";"],
["keyword", "of"], ["punctuation", ";"],
["keyword", "off"], ["punctuation", ";"],
["keyword", "on"], ["punctuation", ";"],
["keyword", "or"], ["punctuation", ";"],
["keyword", "parameters"], ["punctuation", ";"],
["keyword", "persistent"], ["punctuation", ";"],
Expand Down

0 comments on commit c6574e6

Please sign in to comment.