@unocss/transformer-attributify-jsx 0.56.0 → 0.56.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 CHANGED
@@ -11,8 +11,8 @@ function createFilter(include, exclude) {
11
11
  return includePattern.some((p) => id.match(p));
12
12
  };
13
13
  }
14
- const elementRE = /(<\w[\w:\.$-]*\s)([\s\S]*)\/?>/g;
15
- const attributeRE = /([a-zA-Z()#][\[?a-zA-Z0-9-_:()#%\]?]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g;
14
+ const elementRE = /(<\w[\w:\.$-]*\s)([\s\S]*?)(?=>[\s\S]?<\/[\s\w:\.$-]*>|\/>)/g;
15
+ const attributeRE = /(?<!<\/?)([a-zA-Z()#][\[?a-zA-Z0-9-_:()#%\]?]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g;
16
16
  const valuedAttributeRE = /((?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.~<]+)=(?:["]([^"]*)["]|[']([^']*)[']|[{]((?:[`(](?:[^`)]*)[`)]|[^}])+)[}])/gms;
17
17
  function transformerAttributifyJsx(options = {}) {
18
18
  const {
package/dist/index.mjs CHANGED
@@ -9,8 +9,8 @@ function createFilter(include, exclude) {
9
9
  return includePattern.some((p) => id.match(p));
10
10
  };
11
11
  }
12
- const elementRE = /(<\w[\w:\.$-]*\s)([\s\S]*)\/?>/g;
13
- const attributeRE = /([a-zA-Z()#][\[?a-zA-Z0-9-_:()#%\]?]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g;
12
+ const elementRE = /(<\w[\w:\.$-]*\s)([\s\S]*?)(?=>[\s\S]?<\/[\s\w:\.$-]*>|\/>)/g;
13
+ const attributeRE = /(?<!<\/?)([a-zA-Z()#][\[?a-zA-Z0-9-_:()#%\]?]*)(?:\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+))?/g;
14
14
  const valuedAttributeRE = /((?!\d|-{2}|-\d)[a-zA-Z0-9\u00A0-\uFFFF-_:!%-.~<]+)=(?:["]([^"]*)["]|[']([^']*)[']|[{]((?:[`(](?:[^`)]*)[`)]|[^}])+)[}])/gms;
15
15
  function transformerAttributifyJsx(options = {}) {
16
16
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/transformer-attributify-jsx",
3
- "version": "0.56.0",
3
+ "version": "0.56.2",
4
4
  "description": "Support valueless attributify in JSX/TSX.",
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.0"
36
+ "@unocss/core": "0.56.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "magic-string": "^0.30.3"