Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let implicitRelationsStr = "";
if (implicitRelations.length > 0) {
implicitRelationsStr = " \n // implicit relations derived from pcs";
for (let relation of implicitRelations) {
if (relation.to!.type === ArgdownTypes.INFERENCE) {
//we can not refer directly to inferences, only to arguments (undercuts will only appear in implicit relations)
continue;
}
implicitRelationsStr += generateArgdownRelationStringFromRelation(
relation,
argument
);
}
}
let desc = IArgument.getCanonicalMemberText(argument);
if (desc) {
desc = ": " + desc;
} else {
desc = "";
}
return `
\`\`\`argdown
<${
argument.title
}>${desc}${explicitRelationsStr}${implicitRelationsStr}${caveat}
\`\`\``;
};
return Object.keys(response.arguments!).map((k: any) => {
const argument = response.arguments![k];
const title = argument.title;
const item = CompletionItem.create(`<${title}>`);
item.textEdit = TextEdit.replace(range, `<${title}>`);
item.kind = CompletionItemKind.Variable;
const desc = IArgument.getCanonicalMemberText(argument);
if (desc) {
item.detail = desc;
}
return item;
});
} else if (char === ":") {