fedimbed.bluesky: fix regex to account for did as handle

This commit is contained in:
Cynthia Foxwell 2024-11-11 11:48:03 -07:00
parent 1c8d475362
commit af3c834ed4

View file

@ -17,7 +17,7 @@ const FRIENDLY_USERAGENT = "HiddenPhox/fedimbed (https://gitdab.com/Cynosphere/H
const URLS_REGEX = /(?:\s|^|\]\()(\|\|\s*)?(https?:\/\/[^\s<]+[^<.,:;"'\]|)\s])(\s*\)?\|\||\s*[\S]*?\))?/g; const URLS_REGEX = /(?:\s|^|\]\()(\|\|\s*)?(https?:\/\/[^\s<]+[^<.,:;"'\]|)\s])(\s*\)?\|\||\s*[\S]*?\))?/g;
const SPOILER_REGEX = /(?:\s|^)\|\|([\s\S]+?)\|\|/; const SPOILER_REGEX = /(?:\s|^)\|\|([\s\S]+?)\|\|/;
const BSKY_POST_REGEX = /^\/profile\/([a-z0-9][a-z0-9.-]+[a-z0-9]*)\/post\/([a-z0-9]+)\/?$/i; const BSKY_POST_REGEX = /^\/profile\/(did:plc:[a-z0-9]+|[a-z0-9][a-z0-9.-]+[a-z0-9]*)\/post\/([a-z0-9]+)\/?$/i;
const PATH_REGEX = { const PATH_REGEX = {
mastodon: /^\/@(.+?)\/(\d+)\/?/, mastodon: /^\/@(.+?)\/(\d+)\/?/,