Oliver Eyton-Williams ee1e8abd87
feat(curriculum): restore seed + solution to Chinese (#40683)
* feat(tools): add seed/solution restore script

* chore(curriculum): remove empty sections' markers

* chore(curriculum): add seed + solution to Chinese

* chore: remove old formatter

* fix: update getChallenges

parse translated challenges separately, without reference to the source

* chore(curriculum): add dashedName to English

* chore(curriculum): add dashedName to Chinese

* refactor: remove unused challenge property 'name'

* fix: relax dashedName requirement

* fix: stray tag

Remove stray `pre` tag from challenge file.

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
2021-01-12 19:31:00 -07:00

1.4 KiB

id, title, challengeType, dashedName
id title challengeType dashedName
5dfa2407b521be39a3de7be1 Part 13 0 part-13

--description--

Add a target attribute with the value _blank to the anchor (a) element's opening tag, so that the link opens in a new tab.

--hints--

Your p element should have a nested anchor (a) element with the text cat photos. You may have deleted it or have a typo.

const anchor = $('p > a');
assert(
  anchor.length &&
    anchor[0].innerText.toLowerCase().replace(/\s+/g, ' ') === 'cat photos'
);

Your anchor (a) element does not have a target attribute. Check that there is a space after the opening tag's name and/or there are spaces before all attribute names.

assert(document.querySelector('a').hasAttribute('target'));

The value of the target attribute should '_blank'. You have either omitted the value or have a typo. Remember that attribute values should be surrounded with quotation marks.

assert(document.querySelector('a').getAttribute('target') === '_blank');

--seed--

--seed-contents--

<html>
  <body>
    <h1>CatPhotoApp</h1>
    <main>
      <h2>Cat Photos</h2>
      <!-- TODO: Add link to cat photos -->
--fcc-editable-region--
      <p>Click here to view more <a href="https://freecatphotoapp.com">cat photos</a>.</p>
--fcc-editable-region--
      <img src="https://bit.ly/fcc-relaxing-cat" alt="A cute orange cat lying on its back.">
    </main>
  </body>
</html>