diff --git a/package.json b/package.json index 17f4724..4ed93dd 100644 --- a/package.json +++ b/package.json @@ -51,11 +51,6 @@ "default": true, "type": "boolean" }, - "markdown-preview-enhanced.automaticallyShowPreviewOfMarkdownBeingEdited": { - "description": "Automatically show preview of markdown being edited", - "default": false, - "type": "boolean" - }, "markdown-preview-enhanced.enableTypographer": { "description": "Enable smartypants and other sweet transforms.", "default": false, diff --git a/src/extension.ts b/src/extension.ts index 55ca599..f5efc48 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -102,6 +102,7 @@ export function activate(context: vscode.ExtensionContext) { * Open preview automatically if the `automaticallyShowPreviewOfMarkdownBeingEdited` is on. * @param textEditor */ + /* function openPreviewAutomatically(textEditor:vscode.TextEditor) { if (!textEditor) return @@ -129,7 +130,7 @@ export function activate(context: vscode.ExtensionContext) { openPreviewAutomatically(textEditor) })) - /* + context.subscriptions.push(vscode.window.onDidChangeVisibleTextEditors(textEditors=> { // console.log('onDidChangeonDidChangeVisibleTextEditors ', textEditors) })) diff --git a/src/puml.ts b/src/puml.ts index d3f7c45..38bdd1b 100644 --- a/src/puml.ts +++ b/src/puml.ts @@ -97,7 +97,7 @@ export async function render(content:string, fileDirectoryPath:string=""):Promis let startMatch; if (startMatch = content.match(/^\@start(.+?)\s+/m)) { - if (content.match(new RegExp("^\\@end#{startMatch[1]}", 'm'))) + if (content.match(new RegExp(`^\\@end${startMatch[1]}`, 'm'))) null // do nothing else content = "@startuml\n@enduml" // error