mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 01:25:38 -05:00
Merge from vscode merge-base (#22780)
* Revert "Revert "Merge from vscode merge-base (#22769)" (#22779)"
This reverts commit 47a1745180.
* Fix notebook download task
* Remove done call from extensions-ci
This commit is contained in:
@@ -5,8 +5,9 @@
|
||||
|
||||
import * as vscode from 'vscode';
|
||||
import { Command } from '../commandManager';
|
||||
import { MarkdownEngine } from '../markdownEngine';
|
||||
import { MdTableOfContentsProvider } from '../tableOfContents';
|
||||
import { openDocumentLink } from '../util/openDocumentLink';
|
||||
import { Schemes } from '../util/schemes';
|
||||
|
||||
type UriComponents = {
|
||||
readonly scheme?: string;
|
||||
@@ -48,18 +49,18 @@ export class OpenDocumentLinkCommand implements Command {
|
||||
}
|
||||
|
||||
public constructor(
|
||||
private readonly engine: MarkdownEngine
|
||||
private readonly tocProvider: MdTableOfContentsProvider,
|
||||
) { }
|
||||
|
||||
public async execute(args: OpenDocumentLinkArgs) {
|
||||
const fromResource = vscode.Uri.parse('').with(args.fromResource);
|
||||
const targetResource = reviveUri(args.parts).with({ fragment: args.fragment });
|
||||
return openDocumentLink(this.engine, targetResource, fromResource);
|
||||
return openDocumentLink(this.tocProvider, targetResource, fromResource);
|
||||
}
|
||||
}
|
||||
|
||||
function reviveUri(parts: any) {
|
||||
if (parts.scheme === 'file') {
|
||||
if (parts.scheme === Schemes.file) {
|
||||
return vscode.Uri.file(parts.path);
|
||||
}
|
||||
return vscode.Uri.parse('').with(parts);
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Command } from '../commandManager';
|
||||
import { MarkdownEngine } from '../markdownEngine';
|
||||
import { MarkdownItEngine } from '../markdownEngine';
|
||||
import { MarkdownPreviewManager } from '../preview/previewManager';
|
||||
|
||||
export class RefreshPreviewCommand implements Command {
|
||||
@@ -12,7 +12,7 @@ export class RefreshPreviewCommand implements Command {
|
||||
|
||||
public constructor(
|
||||
private readonly webviewManager: MarkdownPreviewManager,
|
||||
private readonly engine: MarkdownEngine
|
||||
private readonly engine: MarkdownItEngine
|
||||
) { }
|
||||
|
||||
public execute() {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Command } from '../commandManager';
|
||||
import { MarkdownEngine } from '../markdownEngine';
|
||||
import { MarkdownItEngine } from '../markdownEngine';
|
||||
import { MarkdownPreviewManager } from '../preview/previewManager';
|
||||
|
||||
export class ReloadPlugins implements Command {
|
||||
@@ -12,7 +12,7 @@ export class ReloadPlugins implements Command {
|
||||
|
||||
public constructor(
|
||||
private readonly webviewManager: MarkdownPreviewManager,
|
||||
private readonly engine: MarkdownEngine,
|
||||
private readonly engine: MarkdownItEngine,
|
||||
) { }
|
||||
|
||||
public execute(): void {
|
||||
|
||||
@@ -4,17 +4,17 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Command } from '../commandManager';
|
||||
import { MarkdownEngine } from '../markdownEngine';
|
||||
import { SkinnyTextDocument } from '../workspaceContents';
|
||||
import { MarkdownItEngine } from '../markdownEngine';
|
||||
import { ITextDocument } from '../types/textDocument';
|
||||
|
||||
export class RenderDocument implements Command {
|
||||
public readonly id = 'markdown.api.render';
|
||||
|
||||
public constructor(
|
||||
private readonly engine: MarkdownEngine
|
||||
private readonly engine: MarkdownItEngine
|
||||
) { }
|
||||
|
||||
public async execute(document: SkinnyTextDocument | string): Promise<string> {
|
||||
public async execute(document: ITextDocument | string): Promise<string> {
|
||||
return (await (this.engine.render(document))).html;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user