Permalink
Browse files

Fixed a bug where "x = x / 10 / (foo);" would match the regular expre…

…ssion pattern.
  • Loading branch information...
1 parent a3c9fcc commit 63056da901bcecb5df22a03e11ca2beedc524bc2 @ioquatix committed Dec 6, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 source/jquery.syntax.core.js
@@ -254,7 +254,7 @@ Syntax.lib.cStyleComment = {pattern: /\/\*[\s\S]*?\*\//gm, klass: 'comment', all
Syntax.lib.cppStyleComment = {pattern: /\/\/.*$/gm, klass: 'comment', allow: ['href']};
Syntax.lib.perlStyleComment = {pattern: /#.*$/gm, klass: 'comment', allow: ['href']};
-Syntax.lib.perlStyleRegularExpression = {pattern: /\B\/([^\/]|\\\/)*?\/[a-z]*(?=\s*($|[^\w\s'"]))/gm, klass: 'constant', incremental: true};
+Syntax.lib.perlStyleRegularExpression = {pattern: /\B\/([^\/]|\\\/)*?\/[a-z]*(?=\s*($|[^\w\s'"\(]))/gm, klass: 'constant', incremental: true};
Syntax.lib.cStyleFunction = {pattern: /([a-z_][a-z0-9_]*)\s*\(/gi, matches: Syntax.extractMatches({klass: 'function'})};
Syntax.lib.camelCaseType = {pattern: /\b_*[A-Z][\w]*\b/g, klass: 'type'};

0 comments on commit 63056da

Please sign in to comment.