From 151f7a83eb8392c3e76771dd075f2a4902b1fb5d Mon Sep 17 00:00:00 2001 From: subtlegradient Date: Sun, 16 Mar 2008 03:24:13 +0000 Subject: [PATCH] Don't match a single slash (/) as a regex literal unless there's another one on the same line. Force Regex literals to end at the end of the line. This helps solve some performance issues while coding. Thanks Daniel Stockman git-svn-id: http://macromates.com/svn/Bundles/trunk/Review/Bundles/JavaScript.tmbundle@9128 dfb7d73b-c2ec-0310-8fea-fb051d288c6d --- Syntaxes/JavaScript Basic.tmLanguage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Syntaxes/JavaScript Basic.tmLanguage b/Syntaxes/JavaScript Basic.tmLanguage index e4d8f91..25bf7c0 100644 --- a/Syntaxes/JavaScript Basic.tmLanguage +++ b/Syntaxes/JavaScript Basic.tmLanguage @@ -575,7 +575,7 @@ begin - (?<=[=(:]|^|return)\s*(/)(?![/*+{}?]) + (?<=[=(:]|^|return)\s*(/)(?![/*+{}?]|$) beginCaptures 1 @@ -585,7 +585,7 @@ end - (/)[igm]* + (/)[igm]*|$ endCaptures 1