@unocss/extractor-arbitrary-variants 0.56.5 → 0.57.0

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 CHANGED
@@ -17,7 +17,7 @@ const arbitraryPropertyCandidateRE = /^\[(\\\W|[\w-])+:['"]?\S+?['"]?\]$/;
17
17
  function splitCodeWithArbitraryVariants(code) {
18
18
  const result = [];
19
19
  for (const match of code.matchAll(arbitraryPropertyRE)) {
20
- if (!code[match.index - 1]?.match(/^[\s'"`]/))
20
+ if (match.index !== 0 && !code[match.index - 1]?.match(/^[\s'"`]/))
21
21
  continue;
22
22
  result.push(match[0]);
23
23
  }
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ const arbitraryPropertyCandidateRE = /^\[(\\\W|[\w-])+:['"]?\S+?['"]?\]$/;
13
13
  function splitCodeWithArbitraryVariants(code) {
14
14
  const result = [];
15
15
  for (const match of code.matchAll(arbitraryPropertyRE)) {
16
- if (!code[match.index - 1]?.match(/^[\s'"`]/))
16
+ if (match.index !== 0 && !code[match.index - 1]?.match(/^[\s'"`]/))
17
17
  continue;
18
18
  result.push(match[0]);
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/extractor-arbitrary-variants",
3
- "version": "0.56.5",
3
+ "version": "0.57.0",
4
4
  "description": "Extractor arbitrary variants for utilities",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -33,7 +33,7 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@unocss/core": "0.56.5"
36
+ "@unocss/core": "0.57.0"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "unbuild",