Skip to content

Commit

Permalink
Merge pull request freeCodeCamp#13572 from IanTeo/fix/relax-quoting-s…
Browse files Browse the repository at this point in the history
…tring-challenge

Relax strictness of Quoting Strings with Single Quotes
  • Loading branch information
Greenheart authored Feb 25, 2017
2 parents 16f5a65 + c0c5b95 commit 3526a36
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>&#39;</code> and four double quotes <code>&quot;</code>');"
],
"type": "waypoint",
Expand Down Expand Up @@ -5671,4 +5671,4 @@
"translations": {}
}
]
}
}

0 comments on commit 3526a36

Please sign in to comment.