fix(curriculum): use code instead of editableContents for cafe menu CSS checks (#66027)

This commit is contained in:
Ragini Pandey
2026-02-25 03:10:42 +05:30
committed by GitHub
parent 5586a718fe
commit 46e54e0f38
2 changed files with 4 additions and 4 deletions
@@ -18,13 +18,13 @@ Start by rewriting the styles you have created into the `styles.css` file. Make
Your `styles.css` file should have the `h1, h2, p` type selector.
```js
assert(editableContents.replace(/[\s\n]*/g, "").match(/(h1|h2|p),(h1|h2|p),(h1|h2|p){/));
assert(code.slice(code.indexOf('</html>')).replace(/[\s\n]*/g, "").match(__helpers.concatRegex(__helpers.permutateRegex(['h1', 'h2', 'p'], { elementsSeparator: ',' }), /{/)));
```
Your selector should set the `text-align` property to `center`.
```js
assert(editableContents.match(/text-align:\s*center;?/));
assert(code.slice(code.indexOf('</html>')).match(/text-align:\s*center;?/));
```
Your code should not contain the `<style>` tags.
@@ -18,13 +18,13 @@ Start by rewriting the styles you have created into the `styles.css` file. Make
Your `styles.css` file should have the `h1, h2, p` type selector.
```js
assert.match(editableContents.replace(/[\s\n]*/g, ""), /(h1|h2|p),(h1|h2|p),(h1|h2|p){/);
assert.match(code.slice(code.indexOf('</html>')).replace(/[\s\n]*/g, ""), __helpers.concatRegex(__helpers.permutateRegex(['h1', 'h2', 'p'], { elementsSeparator: ',' }), /{/));
```
Your selector should set the `text-align` property to `center`.
```js
assert.match(editableContents, /text-align:\s*center;?/);
assert.match(code.slice(code.indexOf('</html>')), /text-align:\s*center;?/);
```
Your code should not contain the `<style>` tags.