Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

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

Maurice82fcdcd0fc5a
diff --git a/client/src/styles/rtlCss.test.ts b/client/src/styles/rtlCss.test.ts
index 56e0c9799..8952d5b83 100644
--- a/client/src/styles/rtlCss.test.ts
+++ b/client/src/styles/rtlCss.test.ts
@@ -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 '';