Fix new eslint warnings
This commit is contained in:
parent
d67b057851
commit
176b853174
2 changed files with 53 additions and 53 deletions
|
@ -47,7 +47,7 @@
|
|||
move the map without the hash changing.
|
||||
*/
|
||||
OSM.Router = function (map, rts) {
|
||||
var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
|
||||
var escapeRegExp = /[-{}[\]+?.,\\^$|#\s]/g;
|
||||
var optionalParam = /\((.*?)\)/g;
|
||||
var namedParam = /(\(\?)?:\w+/g;
|
||||
var splatParam = /\*\w+/g;
|
||||
|
@ -57,7 +57,7 @@ OSM.Router = function (map, rts) {
|
|||
path.replace(escapeRegExp, "\\$&")
|
||||
.replace(optionalParam, "(?:$1)?")
|
||||
.replace(namedParam, function (match, optional) {
|
||||
return optional ? match : "([^\/]+)";
|
||||
return optional ? match : "([^/]+)";
|
||||
})
|
||||
.replace(splatParam, "(.*?)") + "(?:\\?.*)?$");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue