Archived
1
0

chore(vscode): update to 1.56.0

This commit is contained in:
Akash Satheesan
2021-04-30 20:25:17 +05:30
1749 changed files with 88014 additions and 43316 deletions

View File

@ -207,7 +207,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
this.updatePreview();
}
dispose() {
override dispose() {
super.dispose();
this._disposed = true;
clearTimeout(this.throttleTimer);
@ -434,14 +434,14 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
private async onDidClickPreviewLink(href: string) {
let [hrefPath, fragment] = decodeURIComponent(href).split('#');
// We perviously already resolve absolute paths.
// Now make sure we handle relative file paths
if (hrefPath[0] !== '/') {
// Fix #93691, use this.resource.fsPath instead of this.resource.path
hrefPath = path.join(path.dirname(this.resource.fsPath), hrefPath);
// We perviously already resolve absolute paths.
// Now make sure we handle relative file paths
const dirnameUri = vscode.Uri.parse(path.dirname(this.resource.path));
hrefPath = vscode.Uri.joinPath(dirnameUri, hrefPath).path;
} else {
// Handle any normalized file paths
hrefPath = vscode.Uri.parse(hrefPath.replace('/file', '')).fsPath;
hrefPath = vscode.Uri.parse(hrefPath.replace('/file', '')).path;
}
const config = vscode.workspace.getConfiguration('markdown', this.resource);
@ -537,7 +537,7 @@ export class StaticMarkdownPreview extends Disposable implements ManagedMarkdown
private readonly _onDidChangeViewState = this._register(new vscode.EventEmitter<vscode.WebviewPanelOnDidChangeViewStateEvent>());
public readonly onDidChangeViewState = this._onDidChangeViewState.event;
dispose() {
override dispose() {
this._onDispose.fire();
super.dispose();
}
@ -682,7 +682,7 @@ export class DynamicMarkdownPreview extends Disposable implements ManagedMarkdow
private readonly _onDidChangeViewStateEmitter = this._register(new vscode.EventEmitter<vscode.WebviewPanelOnDidChangeViewStateEvent>());
public readonly onDidChangeViewState = this._onDidChangeViewStateEmitter.event;
dispose() {
override dispose() {
this._preview.dispose();
this._webviewPanel.dispose();

View File

@ -23,7 +23,7 @@ class PreviewStore<T extends ManagedMarkdownPreview> extends Disposable {
private readonly _previews = new Set<T>();
public dispose(): void {
public override dispose(): void {
super.dispose();
for (const preview of this._previews) {
preview.dispose();

View File

@ -134,7 +134,7 @@ export default class MarkdownWorkspaceSymbolProvider extends Disposable implemen
this._workspaceMarkdownDocumentProvider.onDidDeleteMarkdownDocument(this.onDidDeleteDocument, this, this._disposables);
}
const allSymbolsSets = await Promise.all(Array.from(this._symbolCache.values()).map(x => x.value));
const allSymbolsSets = await Promise.all(Array.from(this._symbolCache.values(), x => x.value));
const allSymbols = allSymbolsSets.flat();
return allSymbols.filter(symbolInformation => symbolInformation.name.toLowerCase().indexOf(query.toLowerCase()) !== -1);
}

View File

@ -17,6 +17,7 @@ const UNICODE_NEWLINE_REGEX = /\u2028|\u2029/g;
interface MarkdownItConfig {
readonly breaks: boolean;
readonly linkify: boolean;
readonly typographer: boolean;
}
class TokenCache {
@ -187,7 +188,8 @@ export class MarkdownEngine {
const config = vscode.workspace.getConfiguration('markdown', resource);
return {
breaks: config.get<boolean>('preview.breaks', false),
linkify: config.get<boolean>('preview.linkify', true)
linkify: config.get<boolean>('preview.linkify', true),
typographer: config.get<boolean>('preview.typographer', false)
};
}

View File

@ -8,7 +8,7 @@ const testRunner = require('../../../../test/integration/electron/testrunner');
const options: any = {
ui: 'tdd',
color: (!process.env.BUILD_ARTIFACTSTAGINGDIRECTORY && process.platform !== 'win32'),
color: true,
timeout: 60000
};