freeCodeCamp icon indicating copy to clipboard operation
freeCodeCamp copied to clipboard

All-Caps Hexadecimal Code Required?

Open ghost opened this issue 11 years ago • 4 comments

Challenge http://beta.freecodecamp.com/challenges/waypoint-use-hex-code-to-color-elements-green has an issue. Please describe how to reproduce it, and include links to screenshots if possible.

To complete this challenge the user must type her/ his hex code in all caps, as so: #00FF00. User failure to type her/ his hex code in all caps will result in her/ him being unable to move forward in the challenges.

Basically, it becomes very confusion (as it was for me) when the user is unable to move forward although she/ he is inputing the correct hexadecimal code.

Reproducing this issue is simple: type the hexadecimal code in lower-caps and the challenge will be registered as incomplete.

One more note: you guys are awesome for building FCC.

ghost avatar Aug 06 '15 11:08 ghost

var tests = ["assert($('body').css('background-color') === 'rgb(0, 255, 0)', 'Give your <code>body</code> element the background-color of green.')","assert(editor.match(/#00FF00/g) && editor.match(/#00FF00/g).length > 0, 'Use hex code the color green instead of the word \"green\". For example <code>body: { color: #00FF00; }</code>.')"];

changes to

var tests = ["assert($('body').css('background-color') === 'rgb(0, 255, 0)', 'Give your <code>body</code> element the background-color of green.')","assert(editor.match(/#00[Ff]{2}00/g) && editor.match(/#00[Ff]{2}00/g).length > 0, 'Use hex code the color green instead of the word \"green\". For example <code>body: { color: #00FF00; }</code>.')"];

catapixel avatar Aug 06 '15 17:08 catapixel

@catapixel , do you want to make a pull request with your solution, or should I submit this fix? :)

Greenheart avatar Aug 06 '15 20:08 Greenheart

@greenheart if you can do it that would be great. I'm not setup to do it myself right now. Thx!

catapixel avatar Aug 06 '15 21:08 catapixel

@catapixel Okay, I'll submit a pull request on this one in a moment then! :)

Greenheart avatar Aug 06 '15 23:08 Greenheart