@unocss/preset-attributify
Advanced tools
Comparing version 0.1.0-beta.2 to 0.1.0
@@ -39,6 +39,7 @@ var __create = Object.create; | ||
]; | ||
var splitterRE = /[\s'"`;]/g; | ||
var splitterRE = /[\s'"`;]+/g; | ||
var elementRE = /<[\w:\.$-]+\s((?:'[\s\S]*?'|"[\s\S]*?"|`[\s\S]*?`|\{[\s\S]*?\}|[\s\S]*?)*?)>/g; | ||
var valuedAttributeRE = /([\w:-]+)(?:=(["'])([^\2]+?)\2)?/g; | ||
var extractorAttributify = (options) => (code) => { | ||
const result = Array.from(code.matchAll(valuedAttributeRE)).flatMap(([, name, _, content]) => { | ||
const result = Array.from(code.matchAll(elementRE)).flatMap((match) => Array.from((match[1] || "").matchAll(valuedAttributeRE))).flatMap(([, name, _, content]) => { | ||
for (const prefix of strippedPrefixes) { | ||
@@ -45,0 +46,0 @@ if (name.startsWith(prefix)) { |
{ | ||
"name": "@unocss/preset-attributify", | ||
"version": "0.1.0-beta.2", | ||
"version": "0.1.0", | ||
"description": "", | ||
@@ -31,3 +31,3 @@ "keywords": [], | ||
"dependencies": { | ||
"@unocss/core": "0.1.0-beta.2" | ||
"@unocss/core": "0.1.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "scripts": { |
@@ -66,4 +66,8 @@ # @unocss/preset-attributify | ||
## Credits | ||
Initial idea by [@Tahul](https://github.com/Tahul) and [@antfu](https://github.com/antfu). Pior implementation in Windi CSS by [@voorjaar](https://github.com/voorjaar). | ||
## License | ||
MIT License © 2021-PRESENT [Anthony Fu](https://github.com/antfu) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10648
218
73
+ Added@unocss/core@0.1.0(transitive)
- Removed@unocss/core@0.1.0-beta.2(transitive)
Updated@unocss/core@0.1.0