xP: open links in a new tab/window

This commit is contained in:
Přemysl Eric Janouch 2022-09-10 16:14:12 +02:00
parent 5f02dddd11
commit 9eaf78f823
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -358,7 +358,7 @@ let Content = {
while ((match = re.exec(text)) !== null) { while ((match = re.exec(text)) !== null) {
if (end < match.index) if (end < match.index)
a.push(m('span', attrs, text.substring(end, match.index))) a.push(m('span', attrs, text.substring(end, match.index)))
a.push(m('a', {href: match[0], ...attrs}, match[0])) a.push(m('a[target=_blank]', {href: match[0], ...attrs}, match[0]))
end = re.lastIndex end = re.lastIndex
} }
if (end < text.length) if (end < text.length)