@vue/language-plugin-pug 3.3.4 → 3.3.6
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 +4 -11
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const source_map_1 = require("@volar/source-map");
|
|
3
3
|
const baseParse_1 = require("./lib/baseParse");
|
|
4
|
-
const
|
|
4
|
+
const classRE = /^class\s*=/;
|
|
5
5
|
const plugin = ({ modules }) => {
|
|
6
|
+
const { allCodeFeatures, codeFeatures, compileTemplate } = modules['@vue/language-core'];
|
|
6
7
|
return {
|
|
7
8
|
name: require('./package.json').name,
|
|
8
9
|
version: 2.2,
|
|
@@ -25,20 +26,12 @@ const plugin = ({ modules }) => {
|
|
|
25
26
|
ir.template.content,
|
|
26
27
|
ir.template.name,
|
|
27
28
|
0,
|
|
28
|
-
|
|
29
|
-
verification: true,
|
|
30
|
-
completion: true,
|
|
31
|
-
semantic: true,
|
|
32
|
-
navigation: true,
|
|
33
|
-
structure: true,
|
|
34
|
-
format: true,
|
|
35
|
-
},
|
|
29
|
+
codeFeatures?.full ?? allCodeFeatures,
|
|
36
30
|
]);
|
|
37
31
|
}
|
|
38
32
|
},
|
|
39
33
|
compileSFCTemplate(lang, template, options) {
|
|
40
34
|
if (lang === 'pug') {
|
|
41
|
-
const { compileTemplate } = modules['@vue/language-core'];
|
|
42
35
|
let parsed;
|
|
43
36
|
let baseOffset = 0;
|
|
44
37
|
const minIndent = calculateMinIndent(template);
|
|
@@ -65,7 +58,7 @@ const plugin = ({ modules }) => {
|
|
|
65
58
|
onError(error) {
|
|
66
59
|
// #5099
|
|
67
60
|
if (error.code === 2
|
|
68
|
-
&&
|
|
61
|
+
&& classRE.test(parsed.htmlCode.slice(error.loc?.start.offset))) {
|
|
69
62
|
return;
|
|
70
63
|
}
|
|
71
64
|
if (error.loc) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/language-plugin-pug",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"index.d.ts",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "^24.1.0",
|
|
26
26
|
"@vue/compiler-dom": "^3.5.0",
|
|
27
|
-
"@vue/language-core": "3.3.
|
|
27
|
+
"@vue/language-core": "3.3.6"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "4893ec6a4b5ca0d00f8add9aa36c17c47085f05a"
|
|
30
30
|
}
|