Files
freeCodeCamp/curriculum/challenges
awu43 f4b0b0b1b5 fix(curriculum): add test for event.preventDefault (#42522)
* Added note detail and event.preventDefault() test

* Replaced lookbehinds with matches

* Reverted to using \s instead of .

Now only matches if event.preventDefault() call is the only thing in the comment. This avoids matching note comments like "need to call event.preventDefault() here"

* Added optional semicolons for both comment checks

* Added trailing whitespace for line comment check

* Switched to match length checks

This should be equivalent to the two original lookbehinds

* Removed unnecessary .length check

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-06-18 22:05:05 +01:00
..