Skip to content

Commit 1a949bc

Browse files
billyvggithub-actions[bot]
authored andcommitted
Apply formatting changes
1 parent fb3f5bf commit 1a949bc

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

packages/rrweb-snapshot/src/snapshot.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,17 @@ export function filterCSSPropertiesFromInlineStyle(
101101
}
102102

103103
const propertyName = property.slice(0, colonIndex).trim();
104-
104+
105105
// If this property is not in the ignore set, keep it
106106
if (!ignoredProperties.has(propertyName)) {
107107
filteredProperties.push(property);
108108
}
109109
}
110110

111-
return filteredProperties.join('; ') + (filteredProperties.length > 0 && cssText.endsWith(';') ? ';' : '');
111+
return (
112+
filteredProperties.join('; ') +
113+
(filteredProperties.length > 0 && cssText.endsWith(';') ? ';' : '')
114+
);
112115
} catch (error) {
113116
console.warn('Error filtering CSS properties:', error);
114117
return cssText;
@@ -303,7 +306,10 @@ export function transformAttribute(
303306
} else if (name === 'style') {
304307
let processedStyle = absoluteToStylesheet(value, getHref(doc));
305308
if (ignoreCSSAttributes && ignoreCSSAttributes.size > 0) {
306-
processedStyle = filterCSSPropertiesFromInlineStyle(processedStyle, ignoreCSSAttributes);
309+
processedStyle = filterCSSPropertiesFromInlineStyle(
310+
processedStyle,
311+
ignoreCSSAttributes,
312+
);
307313
}
308314
return processedStyle;
309315
} else if (tagName === 'object' && name === 'data') {

0 commit comments

Comments
 (0)