fix(curriculum): look for possible www link in regex (#41955)
* fix(curriculum): look for possible www. link in regex * Add suggestions from Nick Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com> Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
This commit is contained in:
@ -52,7 +52,7 @@ assert($('img').length);
|
|||||||
Your image should have a `src` attribute that points to the kitten image.
|
Your image should have a `src` attribute that points to the kitten image.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(/^https:\/\/www\.bit\.ly\/fcc-relaxing-cat$/i.test($('img').attr('src')));
|
assert(/^https:\/\/(www\.)?bit\.ly\/fcc-relaxing-cat$/i.test($('img').attr('src')));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your image element's `alt` attribute should not be empty.
|
Your image element's `alt` attribute should not be empty.
|
||||||
|
@ -37,9 +37,8 @@ assert(
|
|||||||
Your `form` should have an `action` attribute which is set to `https://www.freecatphotoapp.com/submit-cat-photo`
|
Your `form` should have an `action` attribute which is set to `https://www.freecatphotoapp.com/submit-cat-photo`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(
|
const action = $('form').attr('action');
|
||||||
$('form').attr('action') === 'https://www.freecatphotoapp.com/submit-cat-photo'
|
assert(action.match(/^https:\/\/(www\.)?freecatphotoapp\.com\/submit-cat-photo$/i))
|
||||||
);
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Your `form` element should have well-formed open and close tags.
|
Your `form` element should have well-formed open and close tags.
|
||||||
|
@ -34,7 +34,7 @@ assert(/cat photos/gi.test($('a').text()));
|
|||||||
You need an `a` element that links to `https://www.freecatphotoapp.com`
|
You need an `a` element that links to `https://www.freecatphotoapp.com`
|
||||||
|
|
||||||
```js
|
```js
|
||||||
assert(/^https?:\/\/www\.freecatphotoapp\.com\/?$/i.test($('a').attr('href')));
|
assert(/^https?:\/\/(www\.)?freecatphotoapp\.com\/?$/i.test($('a').attr('href')));
|
||||||
```
|
```
|
||||||
|
|
||||||
Your `a` element should have a closing tag.
|
Your `a` element should have a closing tag.
|
||||||
|
Reference in New Issue
Block a user