mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +00:00
markdown: Use options, not rules, for linkifier regexes.
This avoids the need to set a global from linkifiers.js.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import * as blueslip from "./blueslip";
|
||||
import * as markdown from "./markdown";
|
||||
|
||||
const linkifier_map = new Map(); // regex -> url
|
||||
|
||||
@@ -77,9 +76,6 @@ export function update_linkifier_rules(linkifiers) {
|
||||
|
||||
linkifier_map.set(regex, final_url);
|
||||
}
|
||||
|
||||
// Update our parser with our particular set of linkifiers.
|
||||
markdown.set_linkifier_regexes(Array.from(linkifier_map.keys()));
|
||||
}
|
||||
|
||||
export function initialize(linkifiers) {
|
||||
|
||||
Reference in New Issue
Block a user