emily-css 1.0.7 → 1.0.8

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  A config-driven utility CSS framework. Define your brand once, generate the CSS.
4
4
 
5
- **EmilyUI** is the ecosystem name. `emily-css` is the utility layer published on npm — it's both the package you install and the CLI you use to generate and purge CSS. More packages coming.
5
+ **EmilyUI** is the ecosystem name. `emily-css` is the utility layer published on npm. It's both the package you install and the CLI you use to generate and purge CSS. More packages coming.
6
6
 
7
7
  ## Features
8
8
 
@@ -277,7 +277,7 @@ npx emily-css purge
277
277
 
278
278
  ## Fonts
279
279
 
280
- EmilyUI includes built-in support for **Inter** and **Lexend** via Google Fonts CDN. No font files to download or host the generated CSS handles the import automatically.
280
+ EmilyUI includes built-in support for **Inter** and **Lexend** via Google Fonts CDN. No font files to download or host. The generated CSS handles the import automatically.
281
281
 
282
282
  Set `fontFamily` as an object to use different fonts for headings and body:
283
283
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emily-css",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "A config-driven utility CSS framework. Define your brand once, generate the CSS.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
package/src/purge.js CHANGED
@@ -119,7 +119,7 @@ function purgeBlock(block, usedClasses) {
119
119
  if (!selector.includes('.')) return true;
120
120
 
121
121
  for (const used of usedClasses) {
122
- const escapedUsed = used.replace(/:/g, '\\\\:').replace(/\./g, '\\\\.');
122
+ const escapedUsed = used.replace(/[.*+?^${}()|[\]\\]/g, '\\$&').replace(/:/g, '\\\\:');
123
123
  const boundaryRegex = new RegExp(`\\.${escapedUsed}(?::[\\w\\-]+|[\\s,>+~]|$)`);
124
124
  if (boundaryRegex.test(selector)) return true;
125
125
  }