1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Desktop, Mobile: Restrict auto-detection of links, and added option to toggle linkify (#4205)

This commit is contained in:
Laurent
2020-12-09 21:52:52 +00:00
committed by GitHub
parent a278c2c32a
commit 5737560e19
4 changed files with 11 additions and 2 deletions

View File

@@ -402,7 +402,7 @@ export default class MdToHtml {
const markdownIt = new MarkdownIt({
breaks: !this.pluginEnabled('softbreaks'),
typographer: this.pluginEnabled('typographer'),
linkify: true,
linkify: this.pluginEnabled('linkify'),
html: true,
highlight: (str: string, lang: string) => {
let outputCodeHtml = '';
@@ -495,7 +495,7 @@ export default class MdToHtml {
}
}
setupLinkify(markdownIt);
if (this.pluginEnabled('linkify')) setupLinkify(markdownIt);
const renderedBody = markdownIt.render(body, context);