fix(learn): disallow www link from challenge (#41275)

This commit disallows www link from "Nest an anchor in a paragraph" challenge.
This commit is contained in:
Ilenia
2021-02-26 22:17:47 +01:00
committed by GitHub
parent 2b326e9714
commit 051a010798

View File

@ -47,8 +47,7 @@ You should have an `a` element that links to "`https://freecatphotoapp.com`".
```js ```js
assert( assert(
$('a[href="https://freecatphotoapp.com"]').length > 0 || $('a[href="https://freecatphotoapp.com"]').length > 0
$('a[href="http://www.freecatphotoapp.com"]').length > 0
); );
``` ```
@ -72,8 +71,7 @@ Your `a` element should be nested within your new `p` element.
```js ```js
assert( assert(
$('a[href="https://freecatphotoapp.com"]').parent().is('p') || $('a[href="https://freecatphotoapp.com"]').parent().is('p')
$('a[href="http://www.freecatphotoapp.com"]').parent().is('p')
); );
``` ```
@ -82,10 +80,6 @@ Your `p` element should have the text `View more ` (with a space after it).
```js ```js
assert( assert(
$('a[href="https://freecatphotoapp.com"]') $('a[href="https://freecatphotoapp.com"]')
.parent()
.text()
.match(/View\smore\s/gi) ||
$('a[href="http://www.freecatphotoapp.com"]')
.parent() .parent()
.text() .text()
.match(/View\smore\s/gi) .match(/View\smore\s/gi)