mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: allow better fidelity for auto linkify, disable most tlds based linkify
New site settings: enable_markdown_linkify: which is default on, auto links https:// and http:// and mail:// markdown_linkify_tlds: which allows control of what tlds get autolinked for cases such as www.site.com, default is com|net|gov
This commit is contained in:
parent
f2e7b74d88
commit
ee0d3f15c1
6 changed files with 54 additions and 3 deletions
|
@ -215,10 +215,12 @@ export function setup(opts, siteSettings, state) {
|
|||
html: true,
|
||||
breaks: opts.discourse.features.newline,
|
||||
xhtmlOut: false,
|
||||
linkify: opts.discourse.features.linkify,
|
||||
linkify: siteSettings.enable_markdown_linkify,
|
||||
typographer: siteSettings.enable_markdown_typographer
|
||||
});
|
||||
|
||||
opts.engine.linkify.tlds(siteSettings.markdown_linkify_tlds.split('|'));
|
||||
|
||||
setupUrlDecoding(opts.engine);
|
||||
setupHoister(opts.engine);
|
||||
setupImageDimensions(opts.engine);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue