diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64ec9343769e8f85c1e17e05.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64ec9343769e8f85c1e17e05.md index 55da519da92..8d308c35263 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64ec9343769e8f85c1e17e05.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64ec9343769e8f85c1e17e05.md @@ -14,13 +14,17 @@ Create a `div` element with the class of `task`. Utilize template strings to set You should create a `div` element with the class `task`. ```js -assert.match(code, /.*?)>\s*<\/\s*div\s*>/); +assert.match(matched?.groups.attributes, /\s+class\s*=\s*('|")task\1(\s|$)/); ``` Your `div` element should have the `id` `${id}`. ```js -assert.match(code, /\s*<\/div>/) +const splitted = code.split(/tasksContainer\s*\.\s*innerHTML\s*\+=\s*`/)[1] +const matched = __helpers.removeJSComments(splitted).match(/.*?)>\s*<\/\s*div\s*>/); +assert.match(matched?.groups.attributes, /\s+id\s*=\s*('|")\$\{id\}\1(\s|$)/); ``` # --seed-- diff --git a/curriculum/challenges/english/25-front-end-development/workshop-todo-app/64ec9343769e8f85c1e17e05.md b/curriculum/challenges/english/25-front-end-development/workshop-todo-app/64ec9343769e8f85c1e17e05.md index 55da519da92..8d308c35263 100644 --- a/curriculum/challenges/english/25-front-end-development/workshop-todo-app/64ec9343769e8f85c1e17e05.md +++ b/curriculum/challenges/english/25-front-end-development/workshop-todo-app/64ec9343769e8f85c1e17e05.md @@ -14,13 +14,17 @@ Create a `div` element with the class of `task`. Utilize template strings to set You should create a `div` element with the class `task`. ```js -assert.match(code, /.*?)>\s*<\/\s*div\s*>/); +assert.match(matched?.groups.attributes, /\s+class\s*=\s*('|")task\1(\s|$)/); ``` Your `div` element should have the `id` `${id}`. ```js -assert.match(code, /\s*<\/div>/) +const splitted = code.split(/tasksContainer\s*\.\s*innerHTML\s*\+=\s*`/)[1] +const matched = __helpers.removeJSComments(splitted).match(/.*?)>\s*<\/\s*div\s*>/); +assert.match(matched?.groups.attributes, /\s+id\s*=\s*('|")\$\{id\}\1(\s|$)/); ``` # --seed--