From 939eddcca5dea1ebd1e83b76089a5b0ac4c281c1 Mon Sep 17 00:00:00 2001 From: dphuang2 Date: Wed, 1 Apr 2026 12:00:00 +0800 Subject: [PATCH] Ignore broken CSS (#15) Broken CSS inside a page will throw an error on our behalf. This should be ignored because we are not in control of the CSS on the page we are recording. --- src/rebuild.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rebuild.ts b/src/rebuild.ts index 7200ef81..a0baf2aa 100644 --- a/src/rebuild.ts +++ b/src/rebuild.ts @@ -58,7 +58,7 @@ function getTagName(n: elementNode): string { const HOVER_SELECTOR = /([^\\]):hover/g; export function addHoverClass(cssText: string): string { - const ast = parse(cssText); + const ast = parse(cssText, {silent: true}); if (!ast.stylesheet) { return cssText; }