1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-02-11 19:25:50 +01:00

Normalise regex -> regexp.

This is what JS uses and using both is confusing.
This commit is contained in:
Doug Kearns
2010-10-22 12:03:03 +11:00
parent 5a42002243
commit 4f14857d66
14 changed files with 92 additions and 92 deletions

View File

@@ -511,7 +511,7 @@ const File = Class("File", {
// expand ~
// Yuck.
if (!relative && RegExp("~(?:$|[/" + util.escapeRegex(File.PATH_SEP) + "])").test(path)) {
if (!relative && RegExp("~(?:$|[/" + util.escapeRegexp(File.PATH_SEP) + "])").test(path)) {
// Try $HOME first, on all systems
let home = services.get("environment").get("HOME");

View File

@@ -330,7 +330,7 @@ const Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
* @param {string} str
* @returns {string}
*/
escapeRegex: function escapeRegex(str) {
escapeRegexp: function escapeRegexp(str) {
return str.replace(/([\\{}()[\].?*+])/g, "\\$1");
},