fix: use correct regex to display instagram urls

This commit is contained in:
Felipe 2025-06-14 18:42:01 -04:00
parent 83e032a590
commit c72cd0f4ba
Signed by: pitbuster
SSH key fingerprint: SHA256:HDYu2Pm4/TmSX8GBwV49UvFWr1Ljg8XlHxKeCpjJpOk

View file

@ -181,7 +181,7 @@ async function getAddressReverse(lat: number, long: number): Promise<string> {
function toLink(url: string): string {
let content = url;
const m = url.match("https://instagram.com/(.*)");
const m = url.match(/https:\/\/instagram\.com\/((?:\w|\.)+)\/?/);
if (m) {
content = `@${m[1]}`;
}