Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix that the .replace() function only replaces the first occurrence
  • Loading branch information
eoghanmurray committed May 15, 2024
commit de0c74c4ceb258bcbba3af49ddc5f4a254f1654b
2 changes: 1 addition & 1 deletion packages/rrweb-snapshot/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function fixBrowserCompatibilityIssuesInCSS(cssText: string): string {
!cssText.includes(' -webkit-background-clip: text;')
) {
cssText = cssText.replace(
' background-clip: text;',
/\sbackground-clip:\s*text;/g,
' -webkit-background-clip: text; background-clip: text;',
);
}
Expand Down