From cc974a423138c70cd5b5a62c7ec8ddc32c6e3f6d Mon Sep 17 00:00:00 2001 From: Ho-Wan Date: Sun, 20 Jan 2019 23:34:28 +0000 Subject: [PATCH] enable auto line breaks for markdown preview --- src/trello/TrelloUtils.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/trello/TrelloUtils.ts b/src/trello/TrelloUtils.ts index 4118a49..f2807cd 100644 --- a/src/trello/TrelloUtils.ts +++ b/src/trello/TrelloUtils.ts @@ -37,6 +37,16 @@ export class TrelloUtils { this.getCredentials(); this.getFavoriteList(); + this.setMarkdownPreviewBreaks(); + } + + setMarkdownPreviewBreaks(): void { + try { + const config = vscode.workspace.getConfiguration(); + config.update("markdown.preview.breaks", true, true); + } catch (error) { + console.error(error); + } } isCredentialsProvided(): boolean {