mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
Experiment with switching markdown extension to use native privates
Let's try this out with one extension to start
This commit is contained in:
@@ -10,11 +10,15 @@ import { ITextDocument } from '../types/textDocument';
|
||||
export class RenderDocument implements Command {
|
||||
public readonly id = 'markdown.api.render';
|
||||
|
||||
readonly #engine: MarkdownItEngine;
|
||||
|
||||
public constructor(
|
||||
private readonly _engine: MarkdownItEngine
|
||||
) { }
|
||||
engine: MarkdownItEngine
|
||||
) {
|
||||
this.#engine = engine;
|
||||
}
|
||||
|
||||
public async execute(document: ITextDocument | string): Promise<string> {
|
||||
return (await (this._engine.render(document))).html;
|
||||
return (await (this.#engine.render(document))).html;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user