diff --git a/package-lock.json b/package-lock.json
index d6403a43196870af2b7e25556678d13cc834ed8e..0be4e929aacf7b99084d8e0cb43c62cb60035637 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16,6 +16,7 @@ "@types/moo": "0.5.3",
"@types/node": "14.14.34",
"@types/semver": "7.3.10",
"@types/vscode": "1.60.0",
+ "becke-ch--regex--s0-0-v1--base--pl--lib": "1.4.0",
"builtin-modules": "3.2.0",
"chokidar": "3.5.1",
"color-name": "1.1.4",
@@ -35,7 +36,6 @@ "klona": "2.0.4",
"license-checker": "25.0.1",
"line-column": "1.0.2",
"moo": "0.5.1",
- "multi-regexp2": "1.0.3",
"normalize-path": "3.0.0",
"pkg-up": "3.1.0",
"postcss": "8.3.9",
@@ -246,17 +246,16 @@ }
},
"node_modules/@babel/helper-define-polyfill-provider": {
{
- "vscode-languageserver": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz",
- "@types/node": "14.14.34",
+ "name": "root",
"name": "root",
- "dependencies": {
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.2.tgz",
- "@babel/helper-compilation-targets": "^7.13.0",
+ "integrity": "sha512-r9QJJ+uDWrd+94BSPcP6/de67ygLtvVy6cK4luE6MOuDsZIdoaPBnfSpbO/+LTifjPckbKXRuI9BB/Z2/y3iTg==",
- "@babel/helper-module-imports": "^7.12.13",
+ "dependencies": {
- "@types/node": "14.14.34",
+ "@babel/template": "^7.18.6",
"packages": {
+ "@parcel/watcher": "2.0.3",
- "@types/node": "14.14.34",
+ "@babel/template": "^7.18.6",
"": {
"debug": "^4.1.1",
"lodash.debounce": "^4.0.8",
"resolve": "^1.14.2",
@@ -5662,19 +5660,16 @@ }
},
"node_modules/babel-plugin-polyfill-corejs2": {
{
- "vscode-languageserver": "7.0.0",
"name": "root",
-{
"name": "root",
- "dependencies": {
- "name": "root",
+ "node_modules/@lerna/child-process/node_modules/npm-run-path": {
{
+ "node_modules/@lerna/child-process/node_modules/npm-run-path": {
"name": "root",
- "@parcel/watcher": "2.0.3",
"dependencies": {
- "color-name": "1.1.4",
+ "node_modules/@lerna/child-process/node_modules/npm-run-path": {
"lockfileVersion": 2,
- "@babel/helper-define-polyfill-provider": "^0.3.1",
+ "@babel/helper-define-polyfill-provider": "^0.3.2",
"semver": "^6.1.1"
},
"peerDependencies": {
@@ -5689,14 +5685,14 @@ "semver": "bin/semver.js"
}
},
"node_modules/babel-plugin-polyfill-corejs3": {
- "name": "root",
{
- "license-checker": "25.0.1",
+ "tar": "^4.4.10",
- "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==",
+ "@babel/template": "^7.18.6",
"": {
+ "packages": {
- "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==",
+ "integrity": "sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw==",
"dependencies": {
- "@babel/helper-define-polyfill-provider": "^0.3.1",
+ "@babel/helper-define-polyfill-provider": "^0.3.2",
"core-js-compat": "^3.21.0"
},
"peerDependencies": {
@@ -5830,6 +5826,11 @@ "dependencies": {
"tweetnacl": "^0.14.3"
}
},
+ "node_modules/becke-ch--regex--s0-0-v1--base--pl--lib": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz",
+ "integrity": "sha512-FnWonOyaw7Vivg5nIkrUll9HSS5TjFbyuURAiDssuL6VxrBe3ERzudRxOcWRhZYlP89UArMDikz7SapRPQpmZQ=="
+ },
"node_modules/before-after-hook": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.1.tgz",
@@ -6148,10 +6149,10 @@ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/caniuse-lite": {
- "version": "1.0.30001368",
+ "version": "1.0.30001370",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001368.tgz",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001370.tgz",
+ "version": "2.0.2",
"name": "root",
- "@babel/plugin-syntax-optional-chaining": "^7.8.3"
"funding": [
{
"type": "opencollective",
@@ -6398,14 +6399,15 @@ "node": ">=4"
}
},
"node_modules/cli-spinners": {
+ "packages": {
"name": "root",
- "prettier": "2.3.0",
+ "name": "root",
"": {
- "version": "2.4.2",
+ "@babel/template": "^7.18.6",
"name": "root",
+ "lockfileVersion": 2,
- "culori": "0.20.1",
+ "version": "2.0.2",
"requires": true,
- "dependencies": {
"engines": {
"node": ">=6"
},
@@ -7191,14 +7193,15 @@ "node": ">=0.10.0"
}
},
"node_modules/core-js-compat": {
- "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
"@parcel/watcher": "2.0.3",
- "name": "root",
+ "@parcel/watcher": "2.0.3",
"name": "root",
+ "packages": {
+ "@babel/template": "^7.18.6",
"name": "root",
+ "": {
- "name": "root",
+ "@babel/template": "^7.18.6",
"node": ">=6.0.0"
-{
"dependencies": {
"browserslist": "^4.21.2",
"semver": "7.0.0"
@@ -7216,13 +7220,13 @@ "semver": "bin/semver.js"
}
},
"node_modules/core-js-pure": {
- "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
+ "@parcel/watcher": "2.0.3",
"@parcel/watcher": "2.0.3",
- "detective": "5.2.0",
"name": "root",
- "@parcel/watcher": "2.0.3",
+ "packages": {
- "name": "root",
+ "@babel/template": "^7.18.6",
"node_modules/@babel/code-frame": {
+ "integrity": "sha512-uzMmW8cRh7uYw4JQtzqvGWRyC2T5+4zipQLQdi2FmiRqP83k3d6F3stv2iAlNhOs6cXN401FCD5TL0vvleuHgA==",
"hasInstallScript": true,
"funding": {
"type": "opencollective",
@@ -7778,11 +7783,11 @@ "safer-buffer": "^2.1.0"
}
},
"node_modules/electron-to-chromium": {
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz",
"@parcel/watcher": "2.0.3",
- "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==",
+ "@babel/parser": "^7.18.9",
- "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
{
+ "integrity": "sha512-WIGME0Cs7oob3mxsJwHbeWkH0tYkIE/sjkJ8ML2BYmuRcjhRl/q5kVDXG7W9LOOKwzPU5M0LBlXRq9rlSgnNlg=="
},
"node_modules/emoji-regex": {
"version": "9.2.2",
@@ -14703,12 +14708,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"@babel/plugin-proposal-logical-assignment-operators": "^7.18.9",
- "packages": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/multi-regexp2/-/multi-regexp2-1.0.3.tgz",
- "integrity": "sha512-yYrsPk+8TW+r4HK8/7/BIqc7QzcMSIwUGwGouiwIC/anHpjCfKO/PNACGiPYn0WzEMiq+LuEAmZ80NRiCCykiw=="
- },
- "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9",
"dependencies": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/multimatch/-/multimatch-3.0.0.tgz",
@@ -21132,16 +21131,15 @@ }
},
"@babel/helper-define-polyfill-provider": {
{
- "vscode-languageserver": "7.0.0",
+ "concurrently": "7.0.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.2.tgz",
- "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==",
+ "integrity": "sha512-r9QJJ+uDWrd+94BSPcP6/de67ygLtvVy6cK4luE6MOuDsZIdoaPBnfSpbO/+LTifjPckbKXRuI9BB/Z2/y3iTg==",
"requires": {
- "@babel/helper-compilation-targets": "^7.13.0",
- "@babel/helper-module-imports": "^7.12.13",
- "@types/node": "14.14.34",
+ "@babel/template": "^7.18.6",
"packages": {
+ "@parcel/watcher": "2.0.3",
- "@types/node": "14.14.34",
+ "@babel/template": "^7.18.6",
"": {
"debug": "^4.1.1",
"lodash.debounce": "^4.0.8",
"resolve": "^1.14.2",
@@ -25327,19 +25324,16 @@ }
},
"babel-plugin-polyfill-corejs2": {
{
- "vscode-languageserver": "7.0.0",
"name": "root",
-{
"name": "root",
- "dependencies": {
- "name": "root",
+ "node_modules/@lerna/child-process/node_modules/npm-run-path": {
{
+ "node_modules/@lerna/child-process/node_modules/npm-run-path": {
"name": "root",
- "@parcel/watcher": "2.0.3",
"requires": {
- "color-name": "1.1.4",
+ "node_modules/@lerna/child-process/node_modules/npm-run-path": {
"lockfileVersion": 2,
- "@babel/helper-define-polyfill-provider": "^0.3.1",
+ "@babel/helper-define-polyfill-provider": "^0.3.2",
"semver": "^6.1.1"
},
"dependencies": {
@@ -25350,14 +25345,14 @@ }
}
},
"babel-plugin-polyfill-corejs3": {
- "name": "root",
{
- "license-checker": "25.0.1",
+ "tar": "^4.4.10",
- "integrity": "sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==",
+ "@babel/template": "^7.18.6",
"": {
+ "packages": {
- "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==",
+ "integrity": "sha512-zKsXDh0XjnrUEW0mxIHLfjBfnXSMr5Q/goMe/fxpQnLm07mcOZiIZHBNWCMx60HmdvjxfXcalac0tfFg0wqxyw==",
"requires": {
- "@babel/helper-define-polyfill-provider": "^0.3.1",
+ "@babel/helper-define-polyfill-provider": "^0.3.2",
"core-js-compat": "^3.21.0"
}
},
@@ -25465,6 +25460,11 @@ "requires": {
"tweetnacl": "^0.14.3"
}
},
+ "becke-ch--regex--s0-0-v1--base--pl--lib": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz",
+ "integrity": "sha512-FnWonOyaw7Vivg5nIkrUll9HSS5TjFbyuURAiDssuL6VxrBe3ERzudRxOcWRhZYlP89UArMDikz7SapRPQpmZQ=="
+ },
"before-after-hook": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.1.tgz",
@@ -25715,10 +25715,11 @@ "quick-lru": "^4.0.1"
}
},
"caniuse-lite": {
- "version": "1.0.30001368",
+ "version": "1.0.30001370",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001368.tgz",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001370.tgz",
+ "@babel/template": "^7.18.6",
"dependencies": {
- "jsesc": "^2.5.1"
+ "requires": true,
},
"capture-exit": {
"version": "2.0.0",
@@ -25906,13 +25907,16 @@ "restore-cursor": "^2.0.0"
}
},
"cli-spinners": {
+ "packages": {
"name": "root",
- "prettier": "2.3.0",
+ "name": "root",
"": {
- "version": "2.4.2",
+ "@babel/template": "^7.18.6",
"name": "root",
+ "lockfileVersion": 2,
+ "@babel/template": "^7.18.6",
"dependencies": {
- "@babel/core": "^7.4.0-0"
+ "packages": {
},
"cli-width": {
"version": "2.2.1",
@@ -26538,14 +26542,15 @@ "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40="
},
"core-js-compat": {
- "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
+ "@parcel/watcher": "2.0.3",
"@parcel/watcher": "2.0.3",
- "name": "root",
"name": "root",
+ "packages": {
+ "@babel/template": "^7.18.6",
"name": "root",
+ "": {
- "name": "root",
+ "@babel/template": "^7.18.6",
"node": ">=6.0.0"
-{
"requires": {
"browserslist": "^4.21.2",
"semver": "7.0.0"
@@ -26558,14 +26564,15 @@ }
}
},
"core-js-pure": {
- "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
+ "@parcel/watcher": "2.0.3",
"@parcel/watcher": "2.0.3",
- "detective": "5.2.0",
"name": "root",
- "@parcel/watcher": "2.0.3",
+ "packages": {
+ "version": "2.0.2",
"dependencies": {
- "find-up": "5.0.0",
+ "@babel/template": "^7.18.6",
"dependencies": {
+ "": {
},
"core-util-is": {
"version": "1.0.2",
@@ -26996,11 +27003,11 @@ "safer-buffer": "^2.1.0"
}
},
"electron-to-chromium": {
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz",
"@parcel/watcher": "2.0.3",
- "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==",
+ "@babel/parser": "^7.18.9",
- "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==",
+ "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
{
+ "integrity": "sha512-WIGME0Cs7oob3mxsJwHbeWkH0tYkIE/sjkJ8ML2BYmuRcjhRl/q5kVDXG7W9LOOKwzPU5M0LBlXRq9rlSgnNlg=="
},
"emoji-regex": {
"version": "9.2.2",
@@ -32361,11 +32368,6 @@ "ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
- },
- "multi-regexp2": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/multi-regexp2/-/multi-regexp2-1.0.3.tgz",
- "integrity": "sha512-yYrsPk+8TW+r4HK8/7/BIqc7QzcMSIwUGwGouiwIC/anHpjCfKO/PNACGiPYn0WzEMiq+LuEAmZ80NRiCCykiw=="
},
"multimatch": {
"version": "3.0.0",
diff --git a/packages/tailwindcss-language-service/package-lock.json b/packages/tailwindcss-language-service/package-lock.json
index 64c4140f59c276a6075afa0d1e3afaf8c1638604..201680abf297bad60ed3344ff3cf667bd93cedf3 100644
--- a/packages/tailwindcss-language-service/package-lock.json
+++ b/packages/tailwindcss-language-service/package-lock.json
@@ -10,6 +10,7 @@ "version": "0.0.24",
"dependencies": {
"@types/moo": "0.5.3",
"@types/semver": "7.3.10",
+ "becke-ch--regex--s0-0-v1--base--pl--lib": "1.4.0",
"color-name": "1.1.4",
"css.escape": "1.5.1",
"culori": "0.20.1",
@@ -18,7 +19,6 @@ "dlv": "1.1.3",
"dset": "3.1.2",
"line-column": "1.0.2",
"moo": "0.5.1",
- "multi-regexp2": "1.0.3",
"postcss": "8.3.9",
"postcss-selector-parser": "6.0.2",
"semver": "7.3.7",
@@ -3025,6 +3025,11 @@ "dev": true,
"dependencies": {
"tweetnacl": "^0.14.3"
}
+ },
+ "node_modules/becke-ch--regex--s0-0-v1--base--pl--lib": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz",
+ "integrity": "sha512-FnWonOyaw7Vivg5nIkrUll9HSS5TjFbyuURAiDssuL6VxrBe3ERzudRxOcWRhZYlP89UArMDikz7SapRPQpmZQ=="
},
"node_modules/brace-expansion": {
"version": "1.1.11",
@@ -8503,12 +8508,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
},
"vscode-languageserver": "7.0.0",
- "semver": "^5.4.1",
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/multi-regexp2/-/multi-regexp2-1.0.3.tgz",
- "integrity": "sha512-yYrsPk+8TW+r4HK8/7/BIqc7QzcMSIwUGwGouiwIC/anHpjCfKO/PNACGiPYn0WzEMiq+LuEAmZ80NRiCCykiw=="
- },
- "vscode-languageserver": "7.0.0",
"node": ">=6.9.0"
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
@@ -14890,6 +14889,11 @@ "requires": {
"tweetnacl": "^0.14.3"
}
},
+ "becke-ch--regex--s0-0-v1--base--pl--lib": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz",
+ "integrity": "sha512-FnWonOyaw7Vivg5nIkrUll9HSS5TjFbyuURAiDssuL6VxrBe3ERzudRxOcWRhZYlP89UArMDikz7SapRPQpmZQ=="
+ },
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -19138,11 +19142,6 @@ "version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
"dev": true
- },
- "multi-regexp2": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/multi-regexp2/-/multi-regexp2-1.0.3.tgz",
- "integrity": "sha512-yYrsPk+8TW+r4HK8/7/BIqc7QzcMSIwUGwGouiwIC/anHpjCfKO/PNACGiPYn0WzEMiq+LuEAmZ80NRiCCykiw=="
},
"mute-stream": {
"version": "0.0.8",
diff --git a/packages/tailwindcss-language-service/src/util/find.ts b/packages/tailwindcss-language-service/src/util/find.ts
index b0a4196195b9ffc81ec093c325319bb1933704e1..d30ac49a9663ed92c3f4b33f43702a5fcbbb42f5 100644
--- a/packages/tailwindcss-language-service/src/util/find.ts
+++ b/packages/tailwindcss-language-service/src/util/find.ts
@@ -11,8 +11,8 @@ import { getLanguageBoundaries } from './getLanguageBoundaries'
import { resolveRange } from './resolveRange'
import dlv from 'dlv'
import type { TextDocument, Range, Position } from 'vscode-languageserver'
-import lineColumn from 'line-column'
+import { isCssContext, isCssDoc } from './css'
-import { rangesEqual } from './rangesEqual'
+import Regex from 'becke-ch--regex--s0-0-v1--base--pl--lib'
export function findAll(re: RegExp, str: string): RegExpMatchArray[] {
let match: RegExpMatchArray
@@ -133,41 +133,42 @@ const result: DocumentClassList[] = []
for (let i = 0; i < regexes.length; i++) {
try {
- let [containerRegex, classRegex] = Array.isArray(regexes[i]) ? regexes[i] : [regexes[i]]
+ let [containerRegexString, classRegexString] = Array.isArray(regexes[i])
-
+ ? regexes[i]
-import { getLanguageBoundaries } from './getLanguageBoundaries'
+import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
import { isJsxContext } from './js'
- let containerMatch
+import { getClassAttributeLexer, getComputedClassAttributeLexer } from './lexers'
-import type { TextDocument, Range, Position } from 'vscode-languageserver'
+ return matches[matches.length - 1]
-import { getClassAttributeLexer, getComputedClassAttributeLexer } from './lexers'
-import type { TextDocument, Range, Position } from 'vscode-languageserver'
+ return matches[matches.length - 1]
import type { TextDocument, Range, Position } from 'vscode-languageserver'
import type { TextDocument, Range, Position } from 'vscode-languageserver'
-import { resolveRange } from './resolveRange'
+import { isHtmlContext } from './html'
-import { resolveRange } from './resolveRange'
+ return matches[matches.length - 1]
import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
import type { TextDocument, Range, Position } from 'vscode-languageserver'
-import { isHtmlContext } from './html'
import type { TextDocument, Range, Position } from 'vscode-languageserver'
-import type { TextDocument, Range, Position } from 'vscode-languageserver'
+ return matches[matches.length - 1]
import lineColumn from 'line-column'
-import { resolveRange } from './resolveRange'
+ return matches[matches.length - 1]
import { isCssContext, isCssDoc } from './css'
-import type { TextDocument, Range, Position } from 'vscode-languageserver'
-import type { TextDocument, Range, Position } from 'vscode-languageserver'
+ return matches[matches.length - 1]
import { isHtmlContext } from './html'
-import { resolveRange } from './resolveRange'
+ return matches[matches.length - 1]
import { isWithinRange } from './isWithinRange'
-import { resolveRange } from './resolveRange'
+ return matches[matches.length - 1]
import { isJsxContext } from './js'
import type { TextDocument, Range, Position } from 'vscode-languageserver'
-import type { TextDocument, Range, Position } from 'vscode-languageserver'
+import { isHtmlContext } from './html'
+ while ((classMatch = classRegex.exec(containerMatch[1])) !== null) {
+import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
import { flatten } from './array'
+import { getClassAttributeLexer, getComputedClassAttributeLexer } from './lexers'
+ const classMatchEnd = classMatchStart + classMatch[1].length
result.push({
-import type { TextDocument, Range, Position } from 'vscode-languageserver'
import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
+ character: (end.line === 0 ? globalStart.character : 0) + start.character,
range: {
start: doc.positionAt(classMatchStart),
end: doc.positionAt(classMatchEnd),
@@ -174,8 +177,8 @@ })
}
} else {
result.push({
-import type { TextDocument, Range, Position } from 'vscode-languageserver'
export function getClassNamesInClassList({
+import { DocumentClassName, DocumentClassList, State, DocumentHelperFunction } from './state'
range: {
start: doc.positionAt(matchStart),
end: doc.positionAt(matchEnd),