From 67988d5d4b2d73bfcbaaa9f1400764fd294d6d57 Mon Sep 17 00:00:00 2001 From: Yiyi Wang Date: Wed, 14 Jun 2017 02:49:18 -0500 Subject: [PATCH] removed automaticallyShowPreviewOfMarkdownBeingEdited --- package.json | 5 ----- src/extension.ts | 3 ++- src/puml.ts | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) 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