Revert "linkifiers: Match JS implementation to server implementation."

This reverts commit 091e2f177b.

This version of python_to_js_linkifier fails for at least some real
linkifiers. We'll likely re-introduce this after a bit more debugging.
This commit is contained in:
Tim Abbott
2023-11-16 14:59:18 -08:00
parent 43e9bbe31c
commit 3cfe4b720c
7 changed files with 79 additions and 68 deletions

View File

@@ -650,10 +650,10 @@ InlineLexer.prototype.output = function(src) {
regexes.forEach(function (regex) {
var ret = self.inlineReplacement(regex, src, function(regex, groups, match) {
// Insert the created URL
href = self.linkifier(regex, groups.slice(1, -1), match);
href = self.linkifier(regex, groups, match);
if (href !== undefined) {
href = escape(href);
return groups[0] + self.renderer.link(href, href, groups[1]) + groups.slice(-1)[0]
return self.renderer.link(href, href, match);
} else {
return match;
}