提交 3cf215fb 编写于 作者: M Matt Bierner

Add linkify setting for the markdown preview

Fixes #31801
上级 b3223a84
......@@ -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",
......
{
"markdown.preview.breaks.desc": "Sets how line-breaks are rendered in the markdown preview. Setting it to 'true' creates a <br> 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.",
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册