Merge pull request #405 from mattn/fix-url

fix HyperText matching
This commit is contained in:
Kieran 2023-03-07 13:54:15 +00:00 committed by GitHub
commit 8ce202ebf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ export default function Text({ content, tags, creator }: TextProps) {
.map(f => {
if (typeof f === "string") {
return splitByUrl(f).map(a => {
if (a.startsWith("http")) {
if (a.match(/^https?:\/\//)) {
return <HyperText key={a} link={a} creator={creator} />;
}
return a;