Rename types in the markdown extension (#152905)

Renames in the markdown extension

This renames some types and splits up some files as part of an exploration towards a proper LSP. Changes:

- `SkinnyTextDocument` -> `ITextDocument`
- Moved `ITextDocument` to own file
- `MdWorkspaceContents` -> `IMdWorkspace`
This commit is contained in:
Matt Bierner
2022-06-22 14:12:48 -07:00
committed by GitHub
parent 5f0a3888b4
commit 07144d22c4
35 changed files with 353 additions and 336 deletions

View File

@@ -5,7 +5,7 @@
import { Command } from '../commandManager';
import { MarkdownItEngine } from '../markdownEngine';
import { SkinnyTextDocument } from '../workspaceContents';
import { ITextDocument } from '../types/textDocument';
export class RenderDocument implements Command {
public readonly id = 'markdown.api.render';
@@ -14,7 +14,7 @@ export class RenderDocument implements Command {
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;
}
}