fedimbed: attempt to support masked links

This commit is contained in:
Cynthia Foxwell 2024-04-16 13:08:28 -06:00
parent 61e8b573b1
commit 6146b708db

View file

@ -12,7 +12,7 @@ const FRIENDLY_USERAGENT =
"HiddenPhox/fedimbed (https://gitdab.com/Cynosphere/HiddenPhox)"; "HiddenPhox/fedimbed (https://gitdab.com/Cynosphere/HiddenPhox)";
const URLS_REGEX = const URLS_REGEX =
/(?:\s|^)(\|\|\s*)?(https?:\/\/[^\s<]+[^<.,:;"'\]\s])(\s*\|\|)?/g; /(?:\s|^|\]\()(\|\|\s*)?(https?:\/\/[^\s<]+[^<.,:;"'\]|)\s])(\s*\)?\|\||\s*[\S]*?\))?/g;
const SPOILER_REGEX = /(?:\s|^)\|\|([\s\S]+?)\|\|/; const SPOILER_REGEX = /(?:\s|^)\|\|([\s\S]+?)\|\|/;
const PATH_REGEX = { const PATH_REGEX = {