mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-04-29 16:00:55 -04:00
fix(curriculum): allow class and id to be in any order step 24 todo list (#57644)
Co-authored-by: Ilenia <26656284+ilenia-magoni@users.noreply.github.com> Co-authored-by: Dario-DC <105294544+Dario-DC@users.noreply.github.com>
This commit is contained in:
@@ -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, /<div\s+class\s*=\s*('|")task\1/)
|
||||
const splitted = code.split(/tasksContainer\s*\.\s*innerHTML\s*\+=\s*`/)[1]
|
||||
const matched = __helpers.removeJSComments(splitted).match(/<div(?<attributes>.*?)>\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, /<div\s+class\s*=\s*('|")task\1\s*id\s*=\s*('|")\$\{id\}\2\s*>\s*<\/div>/)
|
||||
const splitted = code.split(/tasksContainer\s*\.\s*innerHTML\s*\+=\s*`/)[1]
|
||||
const matched = __helpers.removeJSComments(splitted).match(/<div(?<attributes>.*?)>\s*<\/\s*div\s*>/);
|
||||
assert.match(matched?.groups.attributes, /\s+id\s*=\s*('|")\$\{id\}\1(\s|$)/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -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, /<div\s+class\s*=\s*('|")task\1/)
|
||||
const splitted = code.split(/tasksContainer\s*\.\s*innerHTML\s*\+=\s*`/)[1]
|
||||
const matched = __helpers.removeJSComments(splitted).match(/<div(?<attributes>.*?)>\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, /<div\s+class\s*=\s*('|")task\1\s*id\s*=\s*('|")\$\{id\}\2\s*>\s*<\/div>/)
|
||||
const splitted = code.split(/tasksContainer\s*\.\s*innerHTML\s*\+=\s*`/)[1]
|
||||
const matched = __helpers.removeJSComments(splitted).match(/<div(?<attributes>.*?)>\s*<\/\s*div\s*>/);
|
||||
assert.match(matched?.groups.attributes, /\s+id\s*=\s*('|")\$\{id\}\1(\s|$)/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
Reference in New Issue
Block a user