Commit 8c054c6c authored by Stefane Fermigier's avatar Stefane Fermigier

Remove unneeded escapes.

parent 182453fb
......@@ -86,17 +86,17 @@
// XXX these regexps fail to detect many invalid dates.
if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+\-][0-2]\d:[0-5]\d|Z)/)
if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/)
|| str.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d\.\d\d\d/)) {
// ISO, milliseconds
this.mom = moment(str);
this.setPrecision(MSEC);
} else if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+\-][0-2]\d:[0-5]\d|Z)/)
} else if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)
|| str.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/)) {
// ISO, seconds
this.mom = moment(str);
this.setPrecision(SEC);
} else if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+\-][0-2]\d:[0-5]\d|Z)/)
} else if (str.match(/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)/)
|| str.match(/\d\d\d\d-\d\d-\d\d \d\d:\d\d/)) {
// ISO, minutes
this.mom = moment(str);
......@@ -184,7 +184,7 @@
// _export('JIODate', JIODate);
//
//
// _export('YEAR', YEAR);
// _export('MONTH', MONTH);
// _export('DAY', DAY);
......
......@@ -1075,10 +1075,10 @@
// browsing every entry
// is part of the user space
if (/^[^\/]+\/[^\/]+$/.test(i)) {
if (/^[^/]+\/[^/]+$/.test(i)) {
// this is an attachment
attachmentFound(param, i);
} else if (/^[^\/]+$/.test(i)) {
} else if (/^[^/]+$/.test(i)) {
// this is a document
param._id = i;
result = repairOne(param, repair);
......
......@@ -93,7 +93,7 @@
// allow tests to check them
param.headers = Object.assign({}, param.headers);
}
param.headers["Content-Type"] = "multipart\/form-data; boundary=" +
param.headers["Content-Type"] = "multipart/form-data; boundary=" +
param.data.boundary;
param.data.body += '--' + param.data.boundary + '--\r\n';
param.data = param.data.body;
......
......@@ -23,7 +23,7 @@
"use strict";
var query_class_dict = {},
regexp_escape = /[\-\[\]{}()*+?.,\\\^$|#\s]/g,
regexp_escape = /[-[\]{}()*+?.,\\^$|#\s]/g,
regexp_percent = /%/g,
regexp_underscore = /_/g,
regexp_operator = /^(?:AND|OR|NOT)$/i,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment