[SVN] Patch for JS regex issue

Peter Michael Gerdes gerdes at invariant.org
Sun Jun 21 18:00:16 UTC 2009


So ECMAScript does allow a regex to start with /{ or /+ or even /} and  
only forbidding // /*.  The javascript language definition was not  
allowing this which caused highlighting problems with some code (for  
example the zotero source).

Attached is a super simple patch for Bundles/JavaScript.tmbundle/ 
Syntaxes/JavaScript.plist to fix the problem.  I'm attaching it as  
both as gzipped file and a straight diff

Peter

P.S. This is where the web page directed me to send this info but I'm  
not sure if that's right

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Javascript.plist.diff.gz
Type: application/x-gzip
Size: 211 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate-dev/attachments/20090621/1233f97c/attachment.gz>
-------------- next part --------------



-- JavaScript.plist	(revision 11673)
+++ JavaScript.plist	(working copy)
@@ -636,7 +636,7 @@
  		</dict>
  		<dict>
  			<key>begin</key>
-			<string>(?<=[=(:]|^|return)\s*(/)(?![/*+{}?])</string>
+			<string>(?<=[=(:]|^|return)\s*(/)(?![/*])</string>
  			<key>beginCaptures</key>
  			<dict>
  				<key>1</key>



More information about the textmate-dev mailing list