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
Showing only changes of commit c72cd0f4ba - Show all commits

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]}`;
}