diff --git a/src/code/colorful.js b/src/code/colorful.js index 91d2468..e83885d 100644 --- a/src/code/colorful.js +++ b/src/code/colorful.js @@ -16,12 +16,12 @@ const IMPORT_2 = /import ([\w\W]*?) from (['"])([^'"]*?)\2/g const IMPORT_3 = /import\((['"])([^'"]*?)\1\)/g const KEYWOWRD1 = /\b(var|const|let|function|for|switch|with|if|else|export|import|assert|as|from|async|await|break|continue|return|class|extends|try|catch|throw|new|while|this|super|default|case|debugger|delete|do|goto|in|static|get|set|public|private|protected|package|typeof|void)\b/g -const KEYWOWRD2 = /\s(=|-|\+|\/|\*|<|>|%)\s/g +const KEYWOWRD2 = /\s(=|-|\+|\/|\*|<|<=|>|>=|%)\s/g const KEYWOWRD3 = - /(\+\=|-=|\/=|\*=|--|\+\+|===|==|=>|\.\.\.|\.|\?\.|\?\?|&&|\|\|)/g + /(\+=|-=|\/=|\*=|\?\?=|--|\+\+|===|==|!==|!=|=>|\.\.\.|\.|\?\.|\?\?|&&|\|\|)/g const BUILDIN1 = /\b(null|undefined|true|false|NaN|Infinity)\b/g const BUILDIN2 = - /\b(Object|String|Array|Boolean|Number|Function|Promise|Map|Set|WeakMap|WeakSet|URL)\b/g + /\b(Object|String|Array|Boolean|Number|Function|Promise|Proxy|Reflect|Map|Set|WeakMap|WeakSet|URL)\b/g const STR = /(['"`])(.*?)(?