@marko/language-server 1.4.5 → 1.4.7
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/dist/index.js +6 -9
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +6 -9
- package/dist/index.mjs.map +2 -2
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1281,11 +1281,9 @@ function OpenTagName({
|
|
|
1281
1281
|
const isAttrTag = tag.type === NodeType2.AttrTag;
|
|
1282
1282
|
const result = [];
|
|
1283
1283
|
if (isAttrTag) {
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
if (parentTagDef) {
|
|
1288
|
-
const { nestedTags } = parentTagDef;
|
|
1284
|
+
const ownerTagDef = tag.owner && tag.owner.nameText && lookup.getTag(tag.owner.nameText);
|
|
1285
|
+
if (ownerTagDef) {
|
|
1286
|
+
const { nestedTags } = ownerTagDef;
|
|
1289
1287
|
for (const key in nestedTags) {
|
|
1290
1288
|
if (key !== "*") {
|
|
1291
1289
|
const tag2 = nestedTags[key];
|
|
@@ -1489,9 +1487,7 @@ function OpenTagName2({
|
|
|
1489
1487
|
let tagDef;
|
|
1490
1488
|
let range = START_LOCATION;
|
|
1491
1489
|
if (tag.type === NodeType4.AttrTag) {
|
|
1492
|
-
|
|
1493
|
-
while (parentTag?.type === NodeType4.AttrTag) parentTag = parentTag.owner;
|
|
1494
|
-
tagDef = parentTag && parentTag.nameText ? lookup.getTag(parentTag.nameText) : void 0;
|
|
1490
|
+
tagDef = tag.owner && tag.owner.nameText ? lookup.getTag(tag.owner.nameText) : void 0;
|
|
1495
1491
|
} else {
|
|
1496
1492
|
tagDef = tag.nameText ? lookup.getTag(tag.nameText) : void 0;
|
|
1497
1493
|
}
|
|
@@ -2710,12 +2706,13 @@ ${documentation}`;
|
|
|
2710
2706
|
}
|
|
2711
2707
|
};
|
|
2712
2708
|
function processScript(doc, tsProject) {
|
|
2713
|
-
return processDoc(doc, ({ filename, parsed, lookup }) => {
|
|
2709
|
+
return processDoc(doc, ({ filename, parsed, lookup, dirname }) => {
|
|
2714
2710
|
const { host, markoScriptLang } = tsProject;
|
|
2715
2711
|
return extractScript({
|
|
2716
2712
|
ts,
|
|
2717
2713
|
parsed,
|
|
2718
2714
|
lookup,
|
|
2715
|
+
translator: Project5.getConfig(dirname).translator,
|
|
2719
2716
|
scriptLang: filename ? Project5.getScriptLang(filename, markoScriptLang, ts, host) : markoScriptLang,
|
|
2720
2717
|
runtimeTypesCode: Project5.getTypeLibs(tsProject.rootDir, ts, host)?.markoTypesCode
|
|
2721
2718
|
});
|