From 87c7877a81eaf4fdb6728b35a6fcdd45d030d1ec Mon Sep 17 00:00:00 2001 From: yutent Date: Tue, 4 Jun 2024 11:35:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=9D=80=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/code/colorful.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 = /(['"`])(.*?)(?