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

Attachment: Javascript.plist.diff.gz
Description: GNU Zip compressed data




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

_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/listinfo/textmate-dev

Reply via email to