diff --git a/extensions/markdown/package.json b/extensions/markdown/package.json index e92d5fae015..2e30ec31dbd 100644 --- a/extensions/markdown/package.json +++ b/extensions/markdown/package.json @@ -168,6 +168,11 @@ "default": false, "description": "%markdown.preview.breaks.desc%" }, + "markdown.preview.linkify": { + "type": "boolean", + "default": true, + "description": "%markdown.preview.linkify%" + }, "markdown.preview.fontFamily": { "type": "string", "default": "-apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif", diff --git a/extensions/markdown/package.nls.json b/extensions/markdown/package.nls.json index 5aed3cdfaf7..f4b19ebbd68 100644 --- a/extensions/markdown/package.nls.json +++ b/extensions/markdown/package.nls.json @@ -1,5 +1,6 @@ { "markdown.preview.breaks.desc": "Sets how line-breaks are rendered in the markdown preview. Setting it to 'true' creates a
for every newline.", + "markdown.preview.linkify": "Enable or disable autoconverting URL-like text to links in the markdown preview.", "markdown.preview.doubleClickToSwitchToEditor.desc": "Double click in the markdown preview to switch to the editor.", "markdown.preview.fontFamily.desc": "Controls the font family used in the markdown preview.", "markdown.preview.fontSize.desc": "Controls the font size in pixels used in the markdown preview.", diff --git a/extensions/markdown/src/markdownEngine.ts b/extensions/markdown/src/markdownEngine.ts index 679da808b25..d41ced769e7 100644 --- a/extensions/markdown/src/markdownEngine.ts +++ b/extensions/markdown/src/markdownEngine.ts @@ -65,7 +65,12 @@ export class MarkdownEngine { this.addLinkNormalizer(this.md); this.addLinkValidator(this.md); } - this.md.set({ breaks: vscode.workspace.getConfiguration('markdown').get('preview.breaks', false) }); + + const config = vscode.workspace.getConfiguration('markdown'); + this.md.set({ + breaks: config.get('preview.breaks', false), + linkify: config.get('preview.linkify', true) + }); return this.md; }