test(rtl): read rtl.css selectors with their white space folded

Prettier breaks the arrow rule's long selector over lines, so the literal
look-up found no rule and FE-RTL-CSS-003 failed after the file was
formatted.
This commit is contained in:
Maurice
2026-11-08 00:38:51 +00:00
parent 3b7cdf516a
commit 82fcdcd0fc
+2 -1
View File
@@ -15,7 +15,8 @@ function ruleBody(...parts: string[]): string {
for (const chunk of css.split('}')) {
const open = chunk.indexOf('{');
if (open < 0) continue;
const head = chunk.slice(0, open);
// Prettier breaks a long selector over lines; compared with its white space folded.
const head = chunk.slice(0, open).replace(/\s+/g, ' ');
if (parts.every((part) => head.includes(part))) return chunk.slice(open + 1);
}
return '';