Merge branch 'main' into thyeggman/cronstrue-hover

This commit is contained in:
Jacob Wallraff
2023-01-24 11:17:08 -08:00
12 changed files with 426 additions and 91 deletions
+3 -4
View File
@@ -51,11 +51,10 @@ export async function hover(document: TextDocument, position: Position, config?:
let description = await getDescription(document, config, result, token, tokenResult.path);
if (token.definition.evaluatorContext.length > 0) {
const allowedContext = token.definitionInfo?.allowedContext;
if (allowedContext && allowedContext?.length > 0) {
// Only add padding if there is a description
description += `${description.length > 0 ? `\n\n` : ""}**Context:** ${token.definition.evaluatorContext.join(
", "
)}`;
description += `${description.length > 0 ? `\n\n` : ""}**Context:** ${allowedContext.join(", ")}`;
}
return {