@marko/language-server 1.4.6 → 1.4.8
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.js
CHANGED
|
@@ -1278,11 +1278,9 @@ function OpenTagName({
|
|
|
1278
1278
|
const isAttrTag = tag.type === import_language_tools5.NodeType.AttrTag;
|
|
1279
1279
|
const result = [];
|
|
1280
1280
|
if (isAttrTag) {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
if (parentTagDef) {
|
|
1285
|
-
const { nestedTags } = parentTagDef;
|
|
1281
|
+
const ownerTagDef = tag.owner && tag.owner.nameText && lookup.getTag(tag.owner.nameText);
|
|
1282
|
+
if (ownerTagDef) {
|
|
1283
|
+
const { nestedTags } = ownerTagDef;
|
|
1286
1284
|
for (const key in nestedTags) {
|
|
1287
1285
|
if (key !== "*") {
|
|
1288
1286
|
const tag2 = nestedTags[key];
|
|
@@ -1478,9 +1476,7 @@ function OpenTagName2({
|
|
|
1478
1476
|
let tagDef;
|
|
1479
1477
|
let range = START_LOCATION;
|
|
1480
1478
|
if (tag.type === import_language_tools9.NodeType.AttrTag) {
|
|
1481
|
-
|
|
1482
|
-
while (parentTag?.type === import_language_tools9.NodeType.AttrTag) parentTag = parentTag.owner;
|
|
1483
|
-
tagDef = parentTag && parentTag.nameText ? lookup.getTag(parentTag.nameText) : void 0;
|
|
1479
|
+
tagDef = tag.owner && tag.owner.nameText ? lookup.getTag(tag.owner.nameText) : void 0;
|
|
1484
1480
|
} else {
|
|
1485
1481
|
tagDef = tag.nameText ? lookup.getTag(tag.nameText) : void 0;
|
|
1486
1482
|
}
|
|
@@ -2684,12 +2680,13 @@ ${documentation}`;
|
|
|
2684
2680
|
}
|
|
2685
2681
|
};
|
|
2686
2682
|
function processScript(doc, tsProject) {
|
|
2687
|
-
return processDoc(doc, ({ filename, parsed, lookup }) => {
|
|
2683
|
+
return processDoc(doc, ({ filename, parsed, lookup, dirname }) => {
|
|
2688
2684
|
const { host, markoScriptLang } = tsProject;
|
|
2689
2685
|
return (0, import_language_tools17.extractScript)({
|
|
2690
2686
|
ts: import_tsserverlibrary.default,
|
|
2691
2687
|
parsed,
|
|
2692
2688
|
lookup,
|
|
2689
|
+
translator: import_language_tools17.Project.getConfig(dirname).translator,
|
|
2693
2690
|
scriptLang: filename ? import_language_tools17.Project.getScriptLang(filename, markoScriptLang, import_tsserverlibrary.default, host) : markoScriptLang,
|
|
2694
2691
|
runtimeTypesCode: import_language_tools17.Project.getTypeLibs(tsProject.rootDir, import_tsserverlibrary.default, host)?.markoTypesCode
|
|
2695
2692
|
});
|