From 99c2f0d4f577f1b87d1e1a5776d8d26aeca7ecc1 Mon Sep 17 00:00:00 2001 From: Ashraf Nazar Date: Sun, 12 Apr 2020 15:15:31 +0100 Subject: [PATCH] fix(curriculum): allow hex triplets for red and green colors to pass tests (#38523) --- .../basic-css/use-hex-code-to-mix-colors.english.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-css/use-hex-code-to-mix-colors.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-css/use-hex-code-to-mix-colors.english.md index 247a4f0967..fe09f94e3d 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-css/use-hex-code-to-mix-colors.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-css/use-hex-code-to-mix-colors.english.md @@ -29,11 +29,11 @@ tests: - text: Your h1 element with the text I am red! should be given the color red. testString: assert($('.red-text').css('color') === 'rgb(255, 0, 0)'); - text: The hex code for the color red should be used instead of the word red. - testString: assert(code.match(/\.red-text\s*?{\s*?color:\s*?#FF0000\s*?;\s*?}/gi)); + testString: assert(code.match(/\.red-text\s*?{\s*?color:\s*?(#FF0000|#F00)\s*?;\s*?}/gi)); - text: Your h1 element with the text I am green! should be given the color green. testString: assert($('.green-text').css('color') === 'rgb(0, 255, 0)'); - text: The hex code for the color green should be used instead of the word green. - testString: assert(code.match(/\.green-text\s*?{\s*?color:\s*?#00FF00\s*?;\s*?}/gi)); + testString: assert(code.match(/\.green-text\s*?{\s*?color:\s*?(#00FF00|#0F0)\s*?;\s*?}/gi)); - text: Your h1 element with the text I am dodger blue! should be given the color dodger blue. testString: assert($('.dodger-blue-text').css('color') === 'rgb(30, 144, 255)'); - text: The hex code for the color dodger blue should be used instead of the word dodgerblue.