Experiment with switching markdown extension to use native privates

Let's try this out with one extension to start
This commit is contained in:
Matt Bierner
2026-03-10 23:13:16 -07:00
parent 6597286e32
commit 7df46143a1
43 changed files with 845 additions and 690 deletions

View File

@@ -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;
}
}