fix HyperText matching

This commit is contained in:
Yasuhiro Matsumoto 2023-03-07 22:35:40 +09:00 committed by Alejandro Gomez
parent 7bb534c68f
commit 683d9a0c40
No known key found for this signature in database
GPG Key ID: 4DF39E566658C817

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;