extensions/markdown-language-features/src/markdownExtensions.ts/fromExtension
	export function fromExtension(
		extension: vscode.Extension<any>
	): MarkdownContributions {
		const contributions = extension.packageJSON && extension.packageJSON.contributes;
		if (!contributions) {
			return MarkdownContributions.Empty;
		}

		const previewStyles = getContributedStyles(contributions, extension);
		const previewScripts = getContributedScripts(contributions, extension);
		const previewResourceRoots = previewStyles.length || previewScripts.length ? [extension.extensionUri] : [];
		const markdownItPlugins = getContributedMarkdownItPlugins(contributions, extension);

		return {
			previewScripts,
			previewStyles,
			previewResourceRoots,
			markdownItPlugins
		};
	}