Fixup for background-clip replacement (#1476)

* Fix that the `.replace()` function only replaces the first occurrence

* This should have been included in #1174

* Create fast-pets-exist.md
This commit is contained in:
Eoghan Murray
2024-05-17 16:28:37 +01:00
committed by GitHub
parent 26c331b3b7
commit cbbd1e55f1
3 changed files with 13 additions and 1 deletions

View File

@@ -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;',
);
}