From ec61748cdcab2136ceee680d412326270ac78ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lasse=20J=C3=B8rgensen?= <28780271+lasjorg@users.noreply.github.com> Date: Thu, 10 Apr 2025 12:34:50 +0200 Subject: [PATCH] fix(curriculum): allow comma separated declarations (#59347) Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com> --- .../lab-sentence-maker/66c057041df6394ca796bf33.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/25-front-end-development/lab-sentence-maker/66c057041df6394ca796bf33.md b/curriculum/challenges/english/25-front-end-development/lab-sentence-maker/66c057041df6394ca796bf33.md index 7c6d225265e..4eb9e74a7a8 100644 --- a/curriculum/challenges/english/25-front-end-development/lab-sentence-maker/66c057041df6394ca796bf33.md +++ b/curriculum/challenges/english/25-front-end-development/lab-sentence-maker/66c057041df6394ca796bf33.md @@ -124,7 +124,7 @@ You should use the correct story format for the first story: `"Once upon a time, ```js const _initialValues = {} for (const name of ['adjective', 'noun', 'noun2', 'place', 'verb', 'adjective2']) { - const match = code.match(new RegExp(String.raw`${name}\s*=\s*('|"|${'`'})(?<${name}>.*)\1;?\s*`)); + const match = code.match(new RegExp(String.raw`${name}\s*=\s*('|"|${'`'})(?<${name}>.*?)\1(?:,|;|\s|$)`, 'm')); _initialValues[name] = match ? match.groups[name] : null; }