fontaine 0.1.2 → 0.1.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.cjs CHANGED
@@ -137,7 +137,9 @@ const FontaineTransform = unplugin.createUnplugin(
137
137
  continue;
138
138
  if (faceRanges.some(([start, end]) => index > start && index < end))
139
139
  continue;
140
- const families = matchContent.split(",").map((f) => f.trim());
140
+ const families = matchContent.split(",").map((f) => f.trim()).filter((f) => !f.startsWith("var("));
141
+ if (!families.length)
142
+ continue;
141
143
  s.overwrite(
142
144
  index,
143
145
  index + matchContent.length,
package/dist/index.mjs CHANGED
@@ -135,7 +135,9 @@ const FontaineTransform = createUnplugin(
135
135
  continue;
136
136
  if (faceRanges.some(([start, end]) => index > start && index < end))
137
137
  continue;
138
- const families = matchContent.split(",").map((f) => f.trim());
138
+ const families = matchContent.split(",").map((f) => f.trim()).filter((f) => !f.startsWith("var("));
139
+ if (!families.length)
140
+ continue;
139
141
  s.overwrite(
140
142
  index,
141
143
  index + matchContent.length,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fontaine",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Automatic font fallback based on font metrics",
5
5
  "repository": "unjs/fontaine",
6
6
  "keywords": [