@unocss/autocomplete 0.32.0 → 0.32.1
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 +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -176,7 +176,7 @@ function createAutocomplete(uno) {
|
|
|
176
176
|
if (cache.has(input))
|
|
177
177
|
return cache.get(input);
|
|
178
178
|
const [, processed, , variants] = uno.matchVariants(input);
|
|
179
|
-
const idx = processed ? input.search(processed) : input.length;
|
|
179
|
+
const idx = processed ? input.search(core.escapeRegExp(processed)) : input.length;
|
|
180
180
|
if (idx === -1)
|
|
181
181
|
return [];
|
|
182
182
|
const variantPrefix = input.slice(0, idx);
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toArray, uniq } from '@unocss/core';
|
|
1
|
+
import { escapeRegExp, toArray, uniq } from '@unocss/core';
|
|
2
2
|
import LRU from 'lru-cache';
|
|
3
3
|
|
|
4
4
|
const shorthands = {
|
|
@@ -168,7 +168,7 @@ function createAutocomplete(uno) {
|
|
|
168
168
|
if (cache.has(input))
|
|
169
169
|
return cache.get(input);
|
|
170
170
|
const [, processed, , variants] = uno.matchVariants(input);
|
|
171
|
-
const idx = processed ? input.search(processed) : input.length;
|
|
171
|
+
const idx = processed ? input.search(escapeRegExp(processed)) : input.length;
|
|
172
172
|
if (idx === -1)
|
|
173
173
|
return [];
|
|
174
174
|
const variantPrefix = input.slice(0, idx);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/autocomplete",
|
|
3
|
-
"version": "0.32.
|
|
3
|
+
"version": "0.32.1",
|
|
4
4
|
"description": "Autocomplete utils for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/lru-cache": "^7.6.1",
|
|
39
|
-
"@unocss/core": "0.32.
|
|
39
|
+
"@unocss/core": "0.32.1"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "unbuild",
|