Skip to content

Commit 24eb0fa

Browse files
Sainanwell-in-that-case
authored andcommitted
Syntax Highlighting: Use a shitty heuristic to differentiate between ':' in ternary expression and ':' in method call
1 parent a7aa32b commit 24eb0fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/theme/pluto.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Prism.languages.pluto = {
1616
'keyword': /\$|\b(?:and|as|class|pluto_class|enum|begin|break|do|else|elseif|end|for|function|goto|if|in|local|new|not|or|repeat|return|static|then|until|while|continue|switch|case|default|pluto_switch|pluto_continue|extends|export|pluto_export|pluto_use|public)\b/,
1717
'variable': /\b(?:self|parent|pluto_parent)\b/,
1818
'operator': [
19-
/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?|\:=|\?|\:|\?\.|instanceof/,
19+
/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?|\:=|\?|(?<!\w)\:|\?\.|instanceof/,
2020
{
2121
pattern: /(^|[^.])\.\.(?!\.)/,
2222
lookbehind: true

0 commit comments

Comments
 (0)