markdown: Use options, not rules, for linkifier regexes.

This avoids the need to set a global from linkifiers.js.
This commit is contained in:
Steve Howell
2022-03-29 20:39:59 +00:00
committed by Tim Abbott
parent 029b3e79a9
commit 326dbfb934
5 changed files with 14 additions and 18 deletions

View File

@@ -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) {