mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Fix #78068
This commit is contained in:
@@ -7,6 +7,7 @@ import * as path from 'path';
|
||||
import { workspace, WorkspaceFolder, extensions } from 'vscode';
|
||||
|
||||
interface ExperimentalConfig {
|
||||
customData?: string[];
|
||||
experimental?: {
|
||||
customData?: string[];
|
||||
};
|
||||
@@ -23,6 +24,17 @@ export function getCustomDataPathsInAllWorkspaces(workspaceFolders: WorkspaceFol
|
||||
const allHtmlConfig = workspace.getConfiguration(undefined, wf.uri);
|
||||
const wfHtmlConfig = allHtmlConfig.inspect<ExperimentalConfig>('html');
|
||||
|
||||
if (wfHtmlConfig && wfHtmlConfig.workspaceFolderValue && wfHtmlConfig.workspaceFolderValue.customData) {
|
||||
const customData = wfHtmlConfig.workspaceFolderValue.customData;
|
||||
if (Array.isArray(customData)) {
|
||||
customData.forEach(t => {
|
||||
if (typeof t === 'string') {
|
||||
dataPaths.push(path.resolve(wf.uri.fsPath, t));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
wfHtmlConfig &&
|
||||
wfHtmlConfig.workspaceFolderValue &&
|
||||
@@ -52,6 +64,19 @@ export function getCustomDataPathsFromAllExtensions(): string[] {
|
||||
if (
|
||||
contributes &&
|
||||
contributes.html &&
|
||||
contributes.html.customData &&
|
||||
Array.isArray(contributes.html.customData)
|
||||
) {
|
||||
const relativePaths: string[] = contributes.html.customData;
|
||||
relativePaths.forEach(rp => {
|
||||
dataPaths.push(path.resolve(extension.extensionPath, rp));
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
contributes &&
|
||||
contributes.html &&
|
||||
contributes.html.experimental &&
|
||||
contributes.html.experimental.customData &&
|
||||
Array.isArray(contributes.html.experimental.customData)
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user