Merge pull request #13572 from IanTeo/fix/relax-quoting-string-challenge
Relax strictness of Quoting Strings with Single Quotes
This commit is contained in:
@ -1084,7 +1084,7 @@
|
||||
"/* head */ 'use strict'; /* solution */ var myStr = '<a href=\"http://www.example.com\" target=\"_blank\">Link</a>'; /* tail */ (function() { return \"myStr = \" + myStr; })();"
|
||||
],
|
||||
"tests": [
|
||||
"assert(!/\\\\/g.test(code) && myStr === '<a href=\"http://www.example.com\" target=\"_blank\">Link</a>', 'message: Remove all the <code>backslashes</code> (<code>\\</code>)');",
|
||||
"assert(!/\\\\/g.test(code) && myStr.match('\\\\s*<a href\\\\s*=\\\\s*\"http://www.example.com\"\\\\s*target\\\\s*=\\\\s*\"_blank\">\\\\s*Link\\\\s*</a>\\\\s*'), 'message: Remove all the <code>backslashes</code> (<code>\\</code>)');",
|
||||
"assert(code.match(/\"/g).length === 6 && code.match(/'/g).length === 4, 'message: You should have two single quotes <code>'</code> and four double quotes <code>"</code>');"
|
||||
],
|
||||
"type": "waypoint",
|
||||
@ -5671,4 +5671,4 @@
|
||||
"translations": {}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user