Skip to content

Commit c879b3a

Browse files
Copilotmrjf
andauthored
Fix style tests: mergeCss now preserves trailing semicolons in CSS output
Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/85c6025c-ac10-4bb6-acf3-6d3d1edc5968 Co-authored-by: mrjf <[email protected]>
1 parent a9b8104 commit c879b3a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/stats/style.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,17 +353,17 @@ function propsToString(props: CellProps | readonly [string, string][]): string {
353353
.join(" ");
354354
}
355355

356-
/** Merge two CSS strings (semicolon-separated). */
356+
/** Merge two CSS strings (semicolon-separated). Always ends with a semicolon. */
357357
function mergeCss(a: string, b: string): string {
358358
const trimA = a.trim().replace(/;$/, "");
359359
const trimB = b.trim().replace(/;$/, "");
360360
if (!trimA) {
361-
return trimB;
361+
return trimB ? `${trimB};` : "";
362362
}
363363
if (!trimB) {
364-
return trimA;
364+
return `${trimA};`;
365365
}
366-
return `${trimA}; ${trimB}`;
366+
return `${trimA}; ${trimB};`;
367367
}
368368

369369
/** Resolve column indices from a ColSubset given all column names. */

0 commit comments

Comments
 (0)