Permalink
Browse files

Improved regular expression parsing - hopefully less buggy than previ…

…ous attempt.
  • Loading branch information...
1 parent a3889fc commit b229b13a5328f794d3ab14f3798f98791701c3a8 @ioquatix committed May 30, 2012
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 b229b13

Please sign in to comment.