How to use the vscode.MarkdownString function in vscode

To help you get started, we’ve selected a few vscode 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 microsoft / vscode / extensions / typescript-language-features / src / features / completions.ts View on Github external
private getDocumentation(
		detail: Proto.CompletionEntryDetails,
		item: MyCompletionItem
	): vscode.MarkdownString | undefined {
		const documentation = new vscode.MarkdownString();
		if (detail.source) {
			const importPath = `'${Previewer.plain(detail.source)}'`;
			const autoImportLabel = localize('autoImportLabel', 'Auto import from {0}', importPath);
			item.detail = `${autoImportLabel}\n${item.detail}`;
		}
		Previewer.addMarkdownDocumentation(documentation, detail.documentation, detail.tags);

		return documentation.value.length ? documentation : undefined;
	}
github castwide / vscode-solargraph / src / RubyCompletionItemProvider.ts View on Github external
private formatDocumentation(doc: string): vscode.MarkdownString {
		var md = new vscode.MarkdownString(doc);
		md.isTrusted = true;
		return md;		
	}
}
github castwide / vscode-solargraph / src / language-client.ts View on Github external
let convertDocumentation = function (text: string):MarkdownString {
		var regexp = /\(solargraph\:(.*?)\)/g;
		var match;
		var adjusted: string = text;
		while (match = regexp.exec(text)) {
			var commandUri = "(command:solargraph._openDocumentUrl?" + encodeURI(JSON.stringify("solargraph:" + match[1])) + ")";
			adjusted = adjusted.replace(match[0], commandUri);
		}
		adjusted = adjusted.replace('<', '<');
		adjusted = adjusted.replace('>', '>');
		var md = new MarkdownString(adjusted);
		md.isTrusted = true;
		return md;
	}

vscode

## ⚠️ Deprecated, use @types/vscode and vscode-test instead ⚠️

MIT
Latest version published 5 years ago

Package Health Score

47 / 100
Full package analysis