@unocss/core 0.46.1 → 0.46.2
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.cjs +8 -3
- package/dist/index.mjs +8 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -282,7 +282,7 @@ function createValueHandler(handlers) {
|
|
|
282
282
|
return handler;
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
const splitCode = (code) => [...new Set(code.split(/\\?[\s'"
|
|
285
|
+
const splitCode = (code) => [...new Set(code.split(/\\?[\s'"`;{}]+/g))].filter(isValidSelector);
|
|
286
286
|
const extractorSplit = {
|
|
287
287
|
name: "split",
|
|
288
288
|
order: 0,
|
|
@@ -416,7 +416,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
418
|
|
|
419
|
-
const version = "0.46.
|
|
419
|
+
const version = "0.46.2";
|
|
420
420
|
|
|
421
421
|
class UnoGenerator {
|
|
422
422
|
constructor(userConfig = {}, defaults = {}) {
|
|
@@ -784,7 +784,12 @@ class UnoGenerator {
|
|
|
784
784
|
let meta;
|
|
785
785
|
let result;
|
|
786
786
|
for (const s of this.config.shortcuts) {
|
|
787
|
-
|
|
787
|
+
let unprefixed = input;
|
|
788
|
+
if (s[2]?.prefix) {
|
|
789
|
+
if (!input.startsWith(s[2].prefix))
|
|
790
|
+
continue;
|
|
791
|
+
unprefixed = input.slice(s[2].prefix.length);
|
|
792
|
+
}
|
|
788
793
|
if (isStaticShortcut(s)) {
|
|
789
794
|
if (s[0] === unprefixed) {
|
|
790
795
|
meta = meta || s[2];
|
package/dist/index.mjs
CHANGED
|
@@ -278,7 +278,7 @@ function createValueHandler(handlers) {
|
|
|
278
278
|
return handler;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
const splitCode = (code) => [...new Set(code.split(/\\?[\s'"
|
|
281
|
+
const splitCode = (code) => [...new Set(code.split(/\\?[\s'"`;{}]+/g))].filter(isValidSelector);
|
|
282
282
|
const extractorSplit = {
|
|
283
283
|
name: "split",
|
|
284
284
|
order: 0,
|
|
@@ -412,7 +412,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
-
const version = "0.46.
|
|
415
|
+
const version = "0.46.2";
|
|
416
416
|
|
|
417
417
|
class UnoGenerator {
|
|
418
418
|
constructor(userConfig = {}, defaults = {}) {
|
|
@@ -780,7 +780,12 @@ class UnoGenerator {
|
|
|
780
780
|
let meta;
|
|
781
781
|
let result;
|
|
782
782
|
for (const s of this.config.shortcuts) {
|
|
783
|
-
|
|
783
|
+
let unprefixed = input;
|
|
784
|
+
if (s[2]?.prefix) {
|
|
785
|
+
if (!input.startsWith(s[2].prefix))
|
|
786
|
+
continue;
|
|
787
|
+
unprefixed = input.slice(s[2].prefix.length);
|
|
788
|
+
}
|
|
784
789
|
if (isStaticShortcut(s)) {
|
|
785
790
|
if (s[0] === unprefixed) {
|
|
786
791
|
meta = meta || s[2];
|