extensions/markdown-language-features/src/preview/security.ts/ExtensionContentSecurityPolicyArbiter/_getRoot
class ExtensionContentSecurityPolicyArbiter:	private _getRoot(resource: vscode.Uri): vscode.Uri {
		if (vscode.workspace.workspaceFolders) {
			const folderForResource = vscode.workspace.getWorkspaceFolder(resource);
			if (folderForResource) {
				return folderForResource.uri;
			}

			if (vscode.workspace.workspaceFolders.length) {
				return vscode.workspace.workspaceFolders[0].uri;
			}
		}

		return resource;
	}