Add workaround for Chrome/Edge css import escaping bug (#1287)
* Upgrade to typescript 4.9.5 * Apply formatting changes * Add workaround for chrome incorrect escaping bug More info: https://bugs.chromium.org/p/chromium/issues/detail?id=1472259 * Apply formatting changes * Create itchy-dryers-double.md * Create rich-jars-remember.md * Apply formatting changes * Update packages/rrweb-snapshot/src/css.ts * Apply formatting changes * Update packages/rrweb-snapshot/test/__snapshots__/integration.test.ts.snap * Apply formatting changes * Update snapshot * Apply formatting changes * Rename and refactor fixBrowserCompatibilityIssuesInCSSImports, getCssRulesString and getCssRuleString based on @eoghanmurray feedback * Apply formatting changes * Apply formatting changes
This commit is contained in:
@@ -345,7 +345,7 @@ export function parse(css: string, options: ParserOptions = {}) {
|
||||
whitespace();
|
||||
comments(rules);
|
||||
while (css.length && css.charAt(0) !== '}' && (node = atrule() || rule())) {
|
||||
if (node !== false) {
|
||||
if (node) {
|
||||
rules.push(node);
|
||||
comments(rules);
|
||||
}
|
||||
@@ -383,7 +383,7 @@ export function parse(css: string, options: ParserOptions = {}) {
|
||||
function comments(rules: Rule[] = []) {
|
||||
let c: Comment | void;
|
||||
while ((c = comment())) {
|
||||
if (c !== false) {
|
||||
if (c) {
|
||||
rules.push(c);
|
||||
}
|
||||
c = comment();
|
||||
|
||||
Reference in New Issue
Block a user