LinkedText: drop RegEx incompatible with Safari

This commit is contained in:
Jesse Chan
2022-04-27 00:37:08 -07:00
parent 723531471f
commit 225b130f85
@@ -18,7 +18,7 @@ function isValidHttpUrl(s: string) {
}
const LinkedText: FC<LinkedTextProps> = ({text, className}: LinkedTextProps) => {
const nodes = text.split(/(?<=\s)(?!\s)(?:\b|\B)/).map((s) =>
const nodes = text.split(/\s/).map((s) =>
isValidHttpUrl(s.trimEnd()) ? (
<a href={s.trimEnd()} target="_blank" rel="noopener noreferrer">
{s}