Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.generateMarkdownForStatement = (eqClass) => {
let relationsStr = "";
if (eqClass.relations) {
for (let relation of eqClass.relations) {
const isOutgoing = relation.to === eqClass;
const relationSymbol = getRelationSymbol(relation.relationType, isOutgoing);
const relationPartner = isOutgoing ? relation.from : relation.to;
const relationPartnerStr = relationPartner.type === core_1.ArgdownTypes.ARGUMENT ? `<${relationPartner.title}>` : `[${relationPartner.title}]`;
relationsStr += `
${relationSymbol} ${relationPartnerStr}`;
}
}
return `
\`\`\`argdown
[${eqClass.title}]: ${core_1.IEquivalenceClass.getCanonicalMemberText(eqClass)}${relationsStr}
\`\`\``;
};
exports.generateMarkdownForArgument = (argument) => {
return Object.keys(response.statements).map((k) => {
const eqClass = response.statements[k];
const title = eqClass.title;
const item = vscode_languageserver_1.CompletionItem.create(`[${title}]`);
item.textEdit = vscode_languageserver_1.TextEdit.replace(range, `[${title}]`);
item.kind = vscode_languageserver_1.CompletionItemKind.Variable;
item.detail = core_1.IEquivalenceClass.getCanonicalMemberText(eqClass);
return item;
});
}