fix: slightly better regex

This commit is contained in:
zkldi
2023-01-31 15:31:18 +00:00
parent 6e876c3007
commit 2ea93d6bcd
@@ -29,7 +29,7 @@ export default function UserPage({ reqUser }: Props) {
}
function InferLinks(aboutMe: string) {
return aboutMe.replace(/(https?:\/\/[^\s]+)(\s)/gu, "[$1]($1)$2");
return aboutMe.replace(/(https?:\/\/[a-zA-Z0-9-._~?&=]+)(\s*)/gu, "[$1]($1)$2");
}
function AboutMeCard({ reqUser }: Props) {