rayantony / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

Small issue in the combinePrefixPatterns.js #179

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. load js-modules/combinePrefixPatterns.js
2. test the following:
var regex1 = new RegExp(/(a)(b)(c)(d)\2/);
var combinedRegex = combinePrefixPatterns([regex1]);
alert(combinedRegex.source);

What is the expected output?  What do you see instead?
expecting: (?:(?:a)(b)(?:c)(?:d)\1)
what i see: (?:(?:a)(b)(?:c)(?:d)\undefined)

What version are you using?  On what browser?
version: svn revision 194
what browser: tested on chrome 15 but expecting the same on other browsers 
since this issue is browser independent

In the patch, there provide the fix to this issue and also:
1. 1 fix on documentation typo
2. remove 1 unused variable declaration

Original issue reported on code.google.com by cws1989@gmail.com on 11 Nov 2011 at 4:50

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r209.

Original comment by mikesamuel@gmail.com on 30 Mar 2012 at 6:07