How to use the @argdown/core.IEquivalenceClass.getCanonicalMemberText function in @argdown/core

To help you get started, we’ve selected a few @argdown/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github christianvoigt / argdown / packages / argdown-language-server / src / providers / utils.ts View on Github external
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,
        eqClass
      );
    }
  }

  let text = IEquivalenceClass.getCanonicalMemberText(eqClass);
  if (text) {
    text = ": " + text;
  } else {
    text = "";
  }
  return `
\`\`\`argdown
[${eqClass.title}]${text}${explicitRelationsStr}${implicitRelationsStr}${caveat}
\`\`\``;
};
github christianvoigt / argdown / packages / argdown-language-server / src / providers / provideCompletion.ts View on Github external
return Object.keys(response.statements!).map((k: any) => {
      const eqClass = response.statements![k];
      const title = eqClass.title;
      const item = CompletionItem.create(`[${title}]`);
      item.textEdit = TextEdit.replace(range, `[${title}]`);
      item.kind = CompletionItemKind.Variable;
      item.detail = IEquivalenceClass.getCanonicalMemberText(eqClass);
      return item;
    });
  } else if (char === "<") {