@unocss/preset-attributify 0.3.0 → 0.4.3

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.js CHANGED
@@ -37,7 +37,7 @@ var strippedPrefixes = [
37
37
  ":"
38
38
  ];
39
39
  var splitterRE = /[\s'"`;]+/g;
40
- var elementRE = /<[\w:\.$-]+\s((?:'[\s\S]*?'|"[\s\S]*?"|`[\s\S]*?`|\{[\s\S]*?\}|[\s\S]*?)*?)>/g;
40
+ var elementRE = /<[\w][\w:\.$-]+\s((?:'[\s\S]*?'|"[\s\S]*?"|`[\s\S]*?`|\{[\s\S]*?\}|[\s\S]*?)*?)>/g;
41
41
  var valuedAttributeRE = /([\w:-]+)(?:=(["'])([^\2]+?)\2)?/g;
42
42
  var extractorAttributify = (options) => (code) => {
43
43
  const result = Array.from(code.matchAll(elementRE)).flatMap((match) => Array.from((match[1] || "").matchAll(valuedAttributeRE))).flatMap(([, name, _, content]) => {
package/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ var strippedPrefixes = [
8
8
  ":"
9
9
  ];
10
10
  var splitterRE = /[\s'"`;]+/g;
11
- var elementRE = /<[\w:\.$-]+\s((?:'[\s\S]*?'|"[\s\S]*?"|`[\s\S]*?`|\{[\s\S]*?\}|[\s\S]*?)*?)>/g;
11
+ var elementRE = /<[\w][\w:\.$-]+\s((?:'[\s\S]*?'|"[\s\S]*?"|`[\s\S]*?`|\{[\s\S]*?\}|[\s\S]*?)*?)>/g;
12
12
  var valuedAttributeRE = /([\w:-]+)(?:=(["'])([^\2]+?)\2)?/g;
13
13
  var extractorAttributify = (options) => (code) => {
14
14
  const result = Array.from(code.matchAll(elementRE)).flatMap((match) => Array.from((match[1] || "").matchAll(valuedAttributeRE))).flatMap(([, name, _, content]) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-attributify",
3
- "version": "0.3.0",
3
+ "version": "0.4.3",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/antfu/unocss#readme",
@@ -28,7 +28,7 @@
28
28
  "dist"
29
29
  ],
30
30
  "dependencies": {
31
- "@unocss/core": "0.3.0"
31
+ "@unocss/core": "0.4.3"
32
32
  },
33
33
  "scripts": {
34
34
  "build": "tsup",