jrburke/requirejs — pull request #574 by lifesinger (2012-12-23 11:27:56+00:00)
Title: Improve parsing dependencies code for commonjs style definition

I have enhanced the regular expression for parsing dependencies and add a test page for this modification.

Fixed the most common cases

```js

var a = "never-ending line\\";
a ='\\';
a = 1 / 2; //require("a2")

a = 1 / 2
require("./a")
//require("b2")

require('c');
require ('b')
require("b");
var o = {
require: function() {
},
f:require('./f')
};
o.require('d');
o.require(require('e' ));

var $require = function() {};
$require('$require');

var xrequire = function() {};
xrequire('xrequire');

/**
* @fileoverview Module authoring format.
*/

var define = function() {
// some comment
var reg = /.*/g; // comment */
}

/* ok, I will disappear. */
var s = '// i am string'; require('./x');
var t = 'i am string too'; // require('z');

/* will not // be removed */ var xx = 'a';

//
// var Calendar = require('calendar');

var str = " /* not a real comment */ ";
var regex = /\/*.*/;
var tt = '"\'';

var xxxx = 'require("show_me_the_money")';

var r = /\/*require('r')*/;
var r2 = /require('r2')/;
var weird = / \/\/ \/b\//g;
```