Skip to content

Commit

Permalink
Fix improper syntax highlighting for in expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
well-in-that-case committed Oct 9, 2023
1 parent a2738c2 commit 76ee603
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/theme/pluto.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Prism.languages.pluto = {
'comment': /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
'function': /(?!\d)\w+(?=\s*(?:[({"]))/,
'function': /\b(?!in\s)(?!\d)\w+(?=\s*(?:[({"]))/,
'string': {
pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,
greedy: true
Expand All @@ -10,7 +10,7 @@ Prism.languages.pluto = {
'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/,
'variable': /\b(?:self|parent|pluto_parent)\b/,
'operator': [
/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?|\:=|\?|\:|\?\.|instanceof/,
/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?|\:=|\?|\:|\?\.|instanceof|in/,
{
pattern: /(^|[^.])\.\.(?!\.)/,
lookbehind: true
Expand Down

0 comments on commit 76ee603

Please sign in to comment.