From 68ac12d7572d022ebd1b4c4c6126350fba97f51e Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 7 Jun 2015 23:31:16 -0700 Subject: [PATCH] improve the wrap an anchor element within a paragraph element challenge --- seed_data/challenges/basic-html5-and-css.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/seed_data/challenges/basic-html5-and-css.json b/seed_data/challenges/basic-html5-and-css.json index a1f757288a..c7c0186a4b 100644 --- a/seed_data/challenges/basic-html5-and-css.json +++ b/seed_data/challenges/basic-html5-and-css.json @@ -1037,7 +1037,7 @@ "name": "Waypoint: Wrap an Anchor Element within a Paragraph", "difficulty": 0.032, "description": [ - "Now wrap your a element within a p element so that the surrounding paragraph says \"click here for cat photos\", but where only \"cat photos\" is a link - the rest is plain text.", + "Now wrap your a element within a new p element so that the surrounding paragraph says \"click here for cat photos\", but where only \"cat photos\" is a link - the rest is plain text.", "Again, here's a diagram of an a element for your reference:", "a diagram of how anchor tags are composed with the same text as on the following line", "Here's an example: <p>Here's a <a href='http://freecodecamp.com'> link to Free Code Camp</a> for you to follow.</p>." @@ -1045,7 +1045,8 @@ "tests": [ "assert($('a').attr('href').match(/catphotoapp.com/gi).length > 0, 'You need an a element that links to \"catphotoapp.com\".')", "assert($('a').text().match(/cat\\sphotos/gi).length > 0, 'Your a element should have the anchor text of \"cat photos\"')", - "assert($('a[href=\\'http://www.catphotoapp.com\\']').parent().is('p'), 'Your a element should be wrapped within a paragraph element.')", + "assert($('p') && $('p').length > 2, 'Create a new p element around your a element. \"click here for\".')", + "assert($('a[href=\\'http://www.catphotoapp.com\\']').parent().is('p'), 'Your a element should be wrapped within your new p element.')", "assert($('p').text().match(/click\\shere\\sfor/gi), 'Your p element should have the text \"click here for\".')", "assert(editor.match(/<\\/p>/g) && editor.match(/

/g).length === editor.match(/

p elements has a closing tag.')", "assert(editor.match(/<\\/a>/g) && editor.match(//g).length === editor.match(/a elements has a closing tag.')"