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

This commit is contained in:
Ilenia 2024-06-21 21:31:04 +02:00 committed by GitHub
parent 416fe240dd
commit e5a5a308fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.