mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 10:19:02 +00:00
Use markdown engine to enable/disable smart paste (#202192)
Fixes #188863 Fixes #188958 Fixes #188868 This is more reliable than using the regular expressions. However the regular expressions are still needed for inline elements
This commit is contained in:
@@ -118,6 +118,12 @@ export class MarkdownItEngine implements IMdParser {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public async getEngine(resource: vscode.Uri | undefined): Promise<MarkdownIt> {
|
||||
const config = this._getConfig(resource);
|
||||
return this._getEngine(config);
|
||||
}
|
||||
|
||||
private async _getEngine(config: MarkdownItConfig): Promise<MarkdownIt> {
|
||||
if (!this._md) {
|
||||
this._md = (async () => {
|
||||
|
||||
Reference in New Issue
Block a user