@tbela99/css-parser 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-umd-web.js +10 -6
- package/dist/index.cjs +10 -6
- package/dist/lib/parser/parse.js +10 -6
- package/package.json +1 -1
package/dist/index-umd-web.js
CHANGED
|
@@ -6371,12 +6371,16 @@
|
|
|
6371
6371
|
}
|
|
6372
6372
|
if (atRule.val == 'import') {
|
|
6373
6373
|
// @ts-ignore
|
|
6374
|
-
if (tokens[0].typ == exports.EnumToken.UrlFunctionTokenType
|
|
6375
|
-
tokens.
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6374
|
+
if (tokens[0].typ == exports.EnumToken.UrlFunctionTokenType) {
|
|
6375
|
+
if (tokens[1].typ == exports.EnumToken.UrlTokenTokenType || tokens[1].typ == exports.EnumToken.StringTokenType) {
|
|
6376
|
+
tokens.shift();
|
|
6377
|
+
if (tokens[1].typ == exports.EnumToken.UrlTokenTokenType) {
|
|
6378
|
+
// @ts-ignore
|
|
6379
|
+
tokens[0].typ = exports.EnumToken.StringTokenType;
|
|
6380
|
+
// @ts-ignore
|
|
6381
|
+
tokens[0].val = `"${tokens[0].val}"`;
|
|
6382
|
+
}
|
|
6383
|
+
}
|
|
6380
6384
|
}
|
|
6381
6385
|
// @ts-ignore
|
|
6382
6386
|
if (tokens[0].typ == exports.EnumToken.StringTokenType) {
|
package/dist/index.cjs
CHANGED
|
@@ -6369,12 +6369,16 @@ async function parseNode(results, context, stats, options, errors, src, map) {
|
|
|
6369
6369
|
}
|
|
6370
6370
|
if (atRule.val == 'import') {
|
|
6371
6371
|
// @ts-ignore
|
|
6372
|
-
if (tokens[0].typ == exports.EnumToken.UrlFunctionTokenType
|
|
6373
|
-
tokens.
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6372
|
+
if (tokens[0].typ == exports.EnumToken.UrlFunctionTokenType) {
|
|
6373
|
+
if (tokens[1].typ == exports.EnumToken.UrlTokenTokenType || tokens[1].typ == exports.EnumToken.StringTokenType) {
|
|
6374
|
+
tokens.shift();
|
|
6375
|
+
if (tokens[1].typ == exports.EnumToken.UrlTokenTokenType) {
|
|
6376
|
+
// @ts-ignore
|
|
6377
|
+
tokens[0].typ = exports.EnumToken.StringTokenType;
|
|
6378
|
+
// @ts-ignore
|
|
6379
|
+
tokens[0].val = `"${tokens[0].val}"`;
|
|
6380
|
+
}
|
|
6381
|
+
}
|
|
6378
6382
|
}
|
|
6379
6383
|
// @ts-ignore
|
|
6380
6384
|
if (tokens[0].typ == exports.EnumToken.StringTokenType) {
|
package/dist/lib/parser/parse.js
CHANGED
|
@@ -346,12 +346,16 @@ async function parseNode(results, context, stats, options, errors, src, map) {
|
|
|
346
346
|
}
|
|
347
347
|
if (atRule.val == 'import') {
|
|
348
348
|
// @ts-ignore
|
|
349
|
-
if (tokens[0].typ == EnumToken.UrlFunctionTokenType
|
|
350
|
-
tokens.
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
349
|
+
if (tokens[0].typ == EnumToken.UrlFunctionTokenType) {
|
|
350
|
+
if (tokens[1].typ == EnumToken.UrlTokenTokenType || tokens[1].typ == EnumToken.StringTokenType) {
|
|
351
|
+
tokens.shift();
|
|
352
|
+
if (tokens[1].typ == EnumToken.UrlTokenTokenType) {
|
|
353
|
+
// @ts-ignore
|
|
354
|
+
tokens[0].typ = EnumToken.StringTokenType;
|
|
355
|
+
// @ts-ignore
|
|
356
|
+
tokens[0].val = `"${tokens[0].val}"`;
|
|
357
|
+
}
|
|
358
|
+
}
|
|
355
359
|
}
|
|
356
360
|
// @ts-ignore
|
|
357
361
|
if (tokens[0].typ == EnumToken.StringTokenType) {
|