From 225b130f85e7a1e657a74a7bb75389cc8627bd73 Mon Sep 17 00:00:00 2001 From: Jesse Chan Date: Wed, 27 Apr 2022 00:37:08 -0700 Subject: [PATCH] LinkedText: drop RegEx incompatible with Safari --- client/src/javascript/components/general/LinkedText.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/javascript/components/general/LinkedText.tsx b/client/src/javascript/components/general/LinkedText.tsx index 81cf6092..a49ccdb3 100644 --- a/client/src/javascript/components/general/LinkedText.tsx +++ b/client/src/javascript/components/general/LinkedText.tsx @@ -18,7 +18,7 @@ function isValidHttpUrl(s: string) { } const LinkedText: FC = ({text, className}: LinkedTextProps) => { - const nodes = text.split(/(?<=\s)(?!\s)(?:\b|\B)/).map((s) => + const nodes = text.split(/\s/).map((s) => isValidHttpUrl(s.trimEnd()) ? ( {s}