[TxMt] Javascript Language Highlighter Misses Regex in Array

Joseph Pecoraro joepeck02 at gmail.com
Thu Jun 26 22:13:55 UTC 2008

Hello All,

The JavaScript language highlighter doesn't highlight regular  
expressions inside of an array.  Here is a code sample that shows some  
simple test cases and only a few pass:

[  /test/,  /test/  ,/test/  ]
new Array(1,2,3)
new Array(/test/, /test/, /test/)

I haven't worked much with languages before, but I assume all that  
would be needed would be including "string.regexp.js" inside of an  
array class or maybe modify "punctuation.definition.string.begin.js".   
I couldn't find any way to do that.  I also tried adding a "," to the  
list of characters that could come before the regexp itself but it  
didn't seem to work, but I'm still new.

Can anyone recommend a solution?

Also, can anyone point me to where I can find the definition of  
"punctuation.definition.*" and the like?

References I have look at:

Thanks in Advance,
Joseph Pecoraro

More information about the textmate mailing list