diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md index ff540de6151..de8cbc35287 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-html-by-building-a-cat-photo-app/5dfa22d1b521be39a3de7be0.md @@ -36,10 +36,17 @@ assert( The link's text should be `cat photos`. You have either omitted the text or have a typo. ```js -const nestedAnchor = document.querySelector(`p > a`); -assert( - nestedAnchor.innerText.toLowerCase().replace(/\s+/g, ' ') === 'cat photos' -); +const nestedAnchor = document.querySelector('p > a'); +const innerContent = nestedAnchor.innerHTML; +assert.isTrue(innerContent.trim() === 'cat photos'); +``` + +The text inside your anchor element has extra leading or trailing whitespace. The only space in the anchor text should be between the word `cat` and the word `photos`. + +```js +const nestedAnchor = document.querySelector('p > a'); +const innerContent = nestedAnchor.innerHTML; +assert.isNotTrue(/^\s+|\s+$/.test(innerContent)); ``` After nesting the anchor (`a`) element, the only `p` element content visible in the browser should be `See more cat photos in our gallery.` Double check the text, spacing, or punctuation of both the `p` and nested anchor element.