fix: use correct regex to display instagram urls #50

Merged
pitbuster merged 1 commit from ig into main 2025-06-14 18:43:59 -04:00

View file

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