From 87f0f75d9eb67509cbbced0ddaf6b8d9a7772b91 Mon Sep 17 00:00:00 2001 From: hanswang123456 <50556568+hanswang123456@users.noreply.github.com> Date: Mon, 8 Aug 2022 07:37:49 -0400 Subject: [PATCH] fix(curriculum): update test regex to allow whitespaces (#47150) * Added spacing fix to catch end of line spaces * allow for spaces before "(" --- .../es6/create-a-javascript-promise.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/create-a-javascript-promise.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/create-a-javascript-promise.md index a0ea3ea95bf..664d8a09303 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/create-a-javascript-promise.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/es6/create-a-javascript-promise.md @@ -33,7 +33,7 @@ Your promise should receive a function with `resolve` and `reject` as parameters ```js assert( code.match( - /Promise\(\s*(function\s*\(\s*resolve\s*,\s*reject\s*\)\s*{|\(\s*resolve\s*,\s*reject\s*\)\s*=>\s*{)[^}]*}/g + /Promise\s*\(\s*(function\s*\(\s*resolve\s*,\s*reject\s*\)\s*{|\(\s*resolve\s*,\s*reject\s*\)\s*=>\s*{)[^}]*}/g ) ); ```