@vue/language-plugin-pug 2.2.0 → 2.2.4
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/index.js +6 -0
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const source_map_1 = require("@volar/source-map");
|
|
3
3
|
const pug = require("volar-service-pug/lib/languageService");
|
|
4
|
+
const classRegex = /^class\s*=/;
|
|
4
5
|
const plugin = ({ modules }) => {
|
|
5
6
|
return {
|
|
6
7
|
name: require('./package.json').name,
|
|
@@ -60,6 +61,11 @@ const plugin = ({ modules }) => {
|
|
|
60
61
|
options?.onWarn?.(createProxyObject(warning));
|
|
61
62
|
},
|
|
62
63
|
onError(error) {
|
|
64
|
+
// #5099
|
|
65
|
+
if (error.code === 2
|
|
66
|
+
&& classRegex.test(pugFile.htmlCode.slice(error.loc?.start.offset))) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
63
69
|
options?.onError?.(createProxyObject(error));
|
|
64
70
|
},
|
|
65
71
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/language-plugin-pug",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"directory": "packages/language-plugin-pug"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@types/node": "
|
|
17
|
-
"@vue/language-core": "2.2.
|
|
16
|
+
"@types/node": "^22.10.4",
|
|
17
|
+
"@vue/language-core": "2.2.4"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@volar/source-map": "~2.4.11",
|
|
21
21
|
"volar-service-pug": "0.0.62"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "c28986596935cb43979c9d437c25f292bdb36cef"
|
|
24
24
|
}
|