escape . in regexp
This commit is contained in:
parent
49967c139a
commit
a41a06ff33
2 changed files with 2 additions and 2 deletions
|
|
@ -603,7 +603,7 @@ function namespace(ns) {
|
|||
text = text
|
||||
.toString()
|
||||
.replace('var ACE_NAMESPACE = "";', 'var ACE_NAMESPACE = "' + ns +'";')
|
||||
.replace(/(.define)|\bdefine\(/g, function(_, a) {
|
||||
.replace(/(\.define)|\bdefine\(/g, function(_, a) {
|
||||
return a || ns + ".define("
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ run("npm install jshint", function() {
|
|||
|
||||
jshintDist = jshintDist.replace(/\brequire\(["']|\(require,|\(require\)/g, function(r){
|
||||
return r.replace("require", "req");
|
||||
}).replace(/\brequire.define(\(|\s*=)/g, function(d){
|
||||
}).replace(/\brequire\.define(\(|\s*=)/g, function(d){
|
||||
return d.replace("define", "def");
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue