@volar/language-core 2.4.22 → 2.4.24
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 +2 -2
- package/lib/editor.js +2 -1
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -57,7 +57,7 @@ function createLanguage(plugins, scriptRegistry, sync, onAssociationDirty) {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
if (!languageId) {
|
|
60
|
-
console.warn(`languageId not found for ${id}`);
|
|
60
|
+
console.warn(`languageId not found for ${String(id)}`);
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
63
|
let associatedOnly = false;
|
|
@@ -119,7 +119,7 @@ function createLanguage(plugins, scriptRegistry, sync, onAssociationDirty) {
|
|
|
119
119
|
snapshot,
|
|
120
120
|
associatedIds: new Set(),
|
|
121
121
|
targetIds: new Set(),
|
|
122
|
-
associatedOnly
|
|
122
|
+
associatedOnly,
|
|
123
123
|
};
|
|
124
124
|
scriptRegistry.set(id, sourceScript);
|
|
125
125
|
if (associatedOnly) {
|
package/lib/editor.js
CHANGED
|
@@ -150,7 +150,8 @@ function findOverlapCodeRange(start, end, map, filter) {
|
|
|
150
150
|
for (const mapping of map.mappings) {
|
|
151
151
|
if (filter(mapping.data)) {
|
|
152
152
|
const mappingStart = mapping.sourceOffsets[0];
|
|
153
|
-
const mappingEnd = mapping.sourceOffsets[mapping.sourceOffsets.length - 1]
|
|
153
|
+
const mappingEnd = mapping.sourceOffsets[mapping.sourceOffsets.length - 1]
|
|
154
|
+
+ mapping.lengths[mapping.lengths.length - 1];
|
|
154
155
|
const overlap = getOverlapRange(start, end, mappingStart, mappingEnd);
|
|
155
156
|
if (overlap) {
|
|
156
157
|
const curMappedStart = (overlap.start - mappingStart) + mapping.generatedOffsets[0];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-core",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.24",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"directory": "packages/language-core"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@volar/source-map": "2.4.
|
|
15
|
+
"@volar/source-map": "2.4.24"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "a5c7cf5d1afa5c3780a48866d17680c223891e42"
|
|
18
18
|
}
|