Fix no-cond-assign in ES5
[MAILPOET-1033]
This commit is contained in:
@@ -35,7 +35,6 @@
|
|||||||
"new-cap": 0,
|
"new-cap": 0,
|
||||||
"no-continue": 0,
|
"no-continue": 0,
|
||||||
"no-new": 0,
|
"no-new": 0,
|
||||||
"no-cond-assign": 0,
|
|
||||||
"space-unary-ops": 0,
|
"space-unary-ops": 0,
|
||||||
"no-redeclare": 0,
|
"no-redeclare": 0,
|
||||||
"no-console": 0,
|
"no-console": 0,
|
||||||
|
@@ -143,7 +143,8 @@ define('date',
|
|||||||
var convertedFormat = [];
|
var convertedFormat = [];
|
||||||
var escapeToken = false;
|
var escapeToken = false;
|
||||||
|
|
||||||
for(var index = 0, token = ''; token = format.charAt(index); index++){
|
for(var index = 0, token = ''; format.charAt(index); index += 1){
|
||||||
|
token = format.charAt(index);
|
||||||
if (escapeToken === true) {
|
if (escapeToken === true) {
|
||||||
convertedFormat.push('['+token+']');
|
convertedFormat.push('['+token+']');
|
||||||
escapeToken = false;
|
escapeToken = false;
|
||||||
|
@@ -315,11 +315,13 @@ define(
|
|||||||
// remove urlencoded characters
|
// remove urlencoded characters
|
||||||
.replace(/\s+|%\d+|,+/g, '');
|
.replace(/\s+|%\d+|,+/g, '');
|
||||||
// detect e-mails that will be otherwise rejected by email regex
|
// detect e-mails that will be otherwise rejected by email regex
|
||||||
if (test = /<(.*?)>/.exec(email)) {
|
test = /<(.*?)>/.exec(email);
|
||||||
|
if (test) {
|
||||||
// is the email inside angle brackets (e.g., 'some@email.com <some@email.com>')?
|
// is the email inside angle brackets (e.g., 'some@email.com <some@email.com>')?
|
||||||
email = test[1].trim();
|
email = test[1].trim();
|
||||||
}
|
}
|
||||||
if (test = /mailto:(?:\s+)?(.*)/.exec(email)) {
|
test = /mailto:(?:\s+)?(.*)/.exec(email);
|
||||||
|
if (test) {
|
||||||
// is the email in 'mailto:email' format?
|
// is the email in 'mailto:email' format?
|
||||||
email = test[1].trim();
|
email = test[1].trim();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user