From 9a4ab36fa4a7a9eeb5ee92f30e0d206c1a401c1e Mon Sep 17 00:00:00 2001 From: g4rry420 <61521805+g4rry420@users.noreply.github.com> Date: Wed, 2 Sep 2020 14:21:52 -0400 Subject: [PATCH] Changed Regex of 3rd textString (#38944) * changes the regex of 3rd textString I changes the regex of 3rd textString so that it can accept h2 as a selector instead of class. * Changed the Regex of 3rd textString I changes the regex of 3rd textString so that it can accept h2 as a selector instead of class. * Changed the Regex of 3rd textString I changes the regex of 3rd textString so that it can accept h2 as a selector instead of class. * Changed the Regex of 3rd textString I changes the regex of 3rd textString so that it can accept h2 as a selector instead of class. * Chamged the Regex of 3rd textString I changes the regex of 3rd textString so that it can accept h2 as a selector instead of class. * Changed the Regex of 3rd textString I changes the regex of 3rd textString so that it can accept h2 as a selector instead of class. * fix: regex tests and instructions * Update curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com> * fix: add suggested change * revert non-english changes Co-authored-by: moT01 <20648924+moT01@users.noreply.github.com> Co-authored-by: Shaun Hamilton <51722130+Sky020@users.noreply.github.com> Co-authored-by: Shaun Hamilton <2397860h@student.gla.ac.uk> --- .../basic-css/import-a-google-font.english.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md index 2c1fe854ec..3c89a9c92f 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/import-a-google-font.english.md @@ -21,7 +21,7 @@ Family names are case-sensitive and need to be wrapped in quotes if there is a s ## Instructions
-Create a font-family CSS rule that uses the Lobster font, and ensure that it will be applied to your h2 element. +Import the Lobster font to your web page. Then, use an element selector to set Lobster as the font-family for your h2 element.
## Tests @@ -33,8 +33,8 @@ tests: testString: assert(new RegExp("googleapis", "gi").test(code)); - text: Your h2 element should use the font Lobster. testString: assert($("h2").css("font-family").match(/lobster/i)); - - text: You should use an h2 CSS selector to change the font. - testString: 'assert(/\s*h2\s*\{\s*font-family\:\s*(\"|")?Lobster(\"|")?(.{0,})\s*;\s*\}/gi.test(code));' + - text: You should only use an h2 element selector to change the font. + testString: assert(/\s*[^\.]h2\s*\{\s*font-family\:\s*(['"]?)Lobster\1\s*(;\s*\}|\})/gi.test(code)); - text: Your p element should still use the font monospace. testString: assert($("p").css("font-family").match(/monospace/i));