@unocss/autocomplete 0.60.2 → 0.60.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.
Files changed (2) hide show
  1. package/dist/index.mjs +3 -3
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -47,8 +47,8 @@ function searchUsageBoundary(line, index, attributify = true) {
47
47
  }
48
48
  function searchAttrKey(content, cursor) {
49
49
  const text = content.substring(0, cursor);
50
- if (/(<\w+\s*)[^>]*$/.test(text))
51
- return text.match(/\S+(?=\s*=\s*["']?[^"']*$)/)?.[0];
50
+ if (/<\w[^>]*$/.test(text))
51
+ return text.match(/\S+(?=\s*=(?:\s*["'])?[^"']*$)/)?.[0];
52
52
  }
53
53
  function cartesian(arr) {
54
54
  return arr.reduce(
@@ -104,7 +104,7 @@ function parseAutocomplete(template, theme = {}, extraShorthands = {}) {
104
104
  function handleNonGroup(input) {
105
105
  handleRegexMatch(
106
106
  input,
107
- /\$([\w\.\|]+)/g,
107
+ /\$([\w.|]+)/g,
108
108
  (m) => {
109
109
  parts.push({
110
110
  type: "theme",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/autocomplete",
3
3
  "type": "module",
4
- "version": "0.60.2",
4
+ "version": "0.60.3",
5
5
  "description": "Autocomplete utils for UnoCSS",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "lru-cache": "^10.2.2"
38
38
  },
39
39
  "devDependencies": {
40
- "@unocss/core": "0.60.2"
40
+ "@unocss/core": "0.60.3"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "unbuild",