fedimbed: fix spoilered links with text in front of them

This commit is contained in:
Cynthia Foxwell 2023-11-08 10:05:51 -07:00
parent ef94755fca
commit bd50cff7c9

View file

@ -13,7 +13,7 @@ const FRIENDLY_USERAGENT =
const URLS_REGEX = const URLS_REGEX =
/(?:\s|^)(\|\|\s*)?(https?:\/\/[^\s<]+[^<.,:;"'\]\s])(\s+\|\|)?/g; /(?:\s|^)(\|\|\s*)?(https?:\/\/[^\s<]+[^<.,:;"'\]\s])(\s+\|\|)?/g;
const SPOILER_REGEX = /^\|\|([\s\S]+?)\|\|/; const SPOILER_REGEX = /(?:\s|^)\|\|([\s\S]+?)\|\|/;
const PATH_REGEX = { const PATH_REGEX = {
mastodon: /^\/@(.+?)\/(\d+)\/?/, mastodon: /^\/@(.+?)\/(\d+)\/?/,