Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,5 @@ function toMonacoDocumentation(doc: string | MarkupContent | undefined): string
if (typeof doc === 'string') return doc;
return {
value: doc.value,
isTrusted: true,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ function toMonacoMarkdownString(

function toSingleMarkdownString(content: MarkupContent | MarkedString): monaco.IMarkdownString {
if (typeof content === 'string') {
return { value: content, isTrusted: true };
return { value: content };
}
if ('kind' in content) {
// MarkupContent
return { value: content.value, isTrusted: true };
return { value: content.value };
}
// MarkedString with language
return { value: `\`\`\`${content.language}\n${content.value}\n\`\`\``, isTrusted: true };
return { value: `\`\`\`${content.language}\n${content.value}\n\`\`\`` };
}
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,5 @@ function toMonacoTooltip(tooltip: string | MarkupContent | undefined): string |

return {
value: tooltip.value,
isTrusted: true,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,5 @@ function toMonacoDocumentation(
if (typeof doc === 'string') return doc;
return {
value: doc.value,
isTrusted: true,
};
}