From 320b8688008a019ede621a79e525b585992f96ba Mon Sep 17 00:00:00 2001 From: Krzysztof G <60067306+gikf@users.noreply.github.com> Date: Mon, 26 Feb 2024 06:59:43 +0100 Subject: [PATCH] fix(curriculum): optional spaces inside parenthesis (#53872) --- .../65c6532520cf4f323329b2c6.md | 2 +- .../64acf287857bb38e6dd7ca69.md | 2 +- .../64c705fd8969d677066792b8.md | 2 +- .../64c74e0064a9080443af0796.md | 2 +- .../64c754f598ca5409d0a08884.md | 2 +- .../64c755bf0034b20a428a4a1b.md | 2 +- .../64cb2da32f8443669fd4e725.md | 4 ++-- .../64cb50fd95831a745ea60d13.md | 2 +- .../64fb14d890415c14f93069ce.md | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65c6532520cf4f323329b2c6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65c6532520cf4f323329b2c6.md index 275d68de2a2..a573d4109e4 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65c6532520cf4f323329b2c6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65c6532520cf4f323329b2c6.md @@ -18,7 +18,7 @@ Now you should see the songs in alphabetical order. You should have `renderSongs(sortSongs())`. ```js -assert.match(code, /renderSongs\(sortSongs\(\)\)/); +assert.match(code, /renderSongs\(\s*sortSongs\(\s*\)\s*\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64acf287857bb38e6dd7ca69.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64acf287857bb38e6dd7ca69.md index 82d474e1806..2bd897669c9 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64acf287857bb38e6dd7ca69.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64acf287857bb38e6dd7ca69.md @@ -18,7 +18,7 @@ You need to use the `proportionalSize` function here to make sure the player's ` You should have an `if` statement that checks if the right key was pressed and the player's `x` position is less than `proportionalSize(400)`. ```js -assert.match(animate.toString(), /keys\.rightKey\.(pressed|pressed\s*===\s*true)\s*&&\s*player\.position\.x\s*<\s*proportionalSize\(400\)/); +assert.match(animate.toString(), /keys\.rightKey\.(pressed|pressed\s*===\s*true)\s*&&\s*player\.position\.x\s*<\s*proportionalSize\(\s*400\s*\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c705fd8969d677066792b8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c705fd8969d677066792b8.md index cddd74a5976..6e281f253a8 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c705fd8969d677066792b8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c705fd8969d677066792b8.md @@ -22,7 +22,7 @@ assert.match(animate.toString(), /else\s+if/); You should check if the left key was pressed and if the player's `x` position is greater than `proportionalSize(100)`. ```js -assert.match(animate.toString(), /keys\.leftKey\.pressed\s*&&\s*player\.position\.x\s*>\s*proportionalSize\(100\)/); +assert.match(animate.toString(), /keys\.leftKey\.pressed\s*&&\s*player\.position\.x\s*>\s*proportionalSize\(\s*100\s*\)/); ``` You should assign the number `-5` to the player's `x` velocity inside the `else if`. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c74e0064a9080443af0796.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c74e0064a9080443af0796.md index 6632b036f7c..863b556c833 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c74e0064a9080443af0796.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c74e0064a9080443af0796.md @@ -17,7 +17,7 @@ You should have a `height` property. ```js const splitter = code.split("if (this.position.x < this.width) {") -assert.match(splitter[1], /this\.height\s*=\s*proportionalSize\(40\)\s*;?/); +assert.match(splitter[1], /this\.height\s*=\s*proportionalSize\(\s*40\s*\)\s*;?/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c754f598ca5409d0a08884.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c754f598ca5409d0a08884.md index a659e2624ff..fe240206bbb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c754f598ca5409d0a08884.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c754f598ca5409d0a08884.md @@ -16,7 +16,7 @@ Add a new object that has an `x` property with a value of `500` and a `y` proper You should have an object with an `x` property with a value of `500` and a `y` property with a value of `proportionalSize(450)`. You are using the `proportionalSize()` function here to make sure the `y` value is proportional to the screen size. ```js -assert.match(code, /{\s*x\s*:\s*500\s*,\s*y\s*:\s*proportionalSize\(450\)\s*}/); +assert.match(code, /{\s*x\s*:\s*500\s*,\s*y\s*:\s*proportionalSize\(\s*450\s*\)\s*}/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c755bf0034b20a428a4a1b.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c755bf0034b20a428a4a1b.md index 1dd5739cbaf..81d735c3b36 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c755bf0034b20a428a4a1b.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64c755bf0034b20a428a4a1b.md @@ -15,7 +15,7 @@ Below that, add another object with an `x` property with a value of `700` and a You should have an object with an `x` property with a value of `700` and a `y` property with a value of `proportionalSize(400)`. ```js -assert.match(code, /{.*x\s*:\s*700.*y\s*:\s*proportionalSize\(400\).*}/); +assert.match(code, /{.*x\s*:\s*700.*y\s*:\s*proportionalSize\(\s*400\s*\).*}/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb2da32f8443669fd4e725.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb2da32f8443669fd4e725.md index 5b9dbe104ae..93d5673caec 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb2da32f8443669fd4e725.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb2da32f8443669fd4e725.md @@ -31,14 +31,14 @@ You should assign the `width` property to `proportionalSize(40)`. ```js const splitter = code.split("ctx.fillRect(this.position.x, this.position.y, this.width, this.height);") -assert.match(splitter[2], /this\.width\s*=\s*proportionalSize\(40\)\s*;?/); +assert.match(splitter[2], /this\.width\s*=\s*proportionalSize\(\s*40\s*\)\s*;?/); ``` You should assign the `height` property to `proportionalSize(70)`. ```js const splitter = code.split("ctx.fillRect(this.position.x, this.position.y, this.width, this.height);") -assert.match(splitter[2], /this\.height\s*=\s*proportionalSize\(70\)\s*;?/); +assert.match(splitter[2], /this\.height\s*=\s*proportionalSize\(\s*70\s*\)\s*;?/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb50fd95831a745ea60d13.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb50fd95831a745ea60d13.md index 8675cabe2c9..e7d0bcc8368 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb50fd95831a745ea60d13.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-intermediate-oop-by-building-a-platformer-game/64cb50fd95831a745ea60d13.md @@ -24,7 +24,7 @@ Your callback function should have `checkpoint`, `index` and `checkpoints` param ```js const splitter = code.split("player.velocity.y = gravity;") -assert.match(splitter[1], /checkpoints\.forEach\(\s*\(checkpoint,\s*index,\s*checkpoints\)\s*=>\s*\{/); +assert.match(splitter[1], /checkpoints\.forEach\(\s*\(\s*checkpoint\s*,\s*index\s*,\s*checkpoints\s*\)\s*=>\s*\{/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64fb14d890415c14f93069ce.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64fb14d890415c14f93069ce.md index d35641d9a95..7a53841a447 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64fb14d890415c14f93069ce.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64fb14d890415c14f93069ce.md @@ -14,7 +14,7 @@ Finally, display the `form` modal with the values of the input fields by using ` You should use `classList` to toggle the class `hidden` on `taskForm`. ```js -assert.match(editTask.toString(), /taskForm\.classList\.toggle\(('|")hidden\1\)\s*;?/) +assert.match(editTask.toString(), /taskForm\.classList\.toggle\(\s*('|")hidden\1\s*\)\s*;?/) ``` # --seed--