extensions/markdown-language-features/src/languageFeatures/dropIntoEditor.ts/createUriListSnippet
export function createUriListSnippet(document: vscode.TextDocument, uris: readonly vscode.Uri[], options?: UriListSnippetOptions): vscode.SnippetString | undefined {
	if (!uris.length) {
		return undefined;
	}

	const dir = getDocumentDir(document);

	const snippet = new vscode.SnippetString();
	uris.forEach((uri, i) => {
		const mdPath = getMdPath(dir, uri);

		const ext = URI.Utils.extname(uri).toLowerCase().replace('.', '');
		const insertAsImage = typeof options?.insertAsImage === 'undefined' ? imageFileExtensions.has(ext) : !!options.insertAsImage;

		snippet.appendText(insertAsImage ? '![' : '[');

		const placeholderText = options?.placeholderText ?? (insertAsImage ? 'Alt text' : 'label');
		const placeholderIndex = typeof options?.placeholderStartIndex !== 'undefined' ? options?.placeholderStartIndex + i : undefined;
		snippet.appendPlaceholder(placeholderText, placeholderIndex);

		snippet.appendText(`](${mdPath})`);

		if (i < uris.length - 1 && uris.length > 1) {
			snippet.appendText(options?.separator ?? ' ');
		}
	});
	return snippet;
}