fix(curriculum): trim string to be working selector (#55192)

This commit is contained in:
Ilenia
2024-06-21 12:31:04 -07:00
committed by GitHub
parent 416fe240dd
commit e5a5a308fa
@@ -26,7 +26,7 @@ You should give the `a` elements inside list items a `color` property.
const helper = new __helpers.CSSHelp(document);
const usedSelector = code.match(/^\s*?(.*?a)\s*?{/m)[1];
assert.notEmpty(helper.getStyle(usedSelector)?.color);
assert.notEmpty(helper.getStyle(usedSelector.replaceAll(/\s+/g, ' ').trim())?.color);
```
You should only change the color of `a` elements inside list elements.