Skip to content

Commit

Permalink
LinkedText: drop RegEx incompatible with Safari
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed Apr 27, 2022
1 parent 7235314 commit 225b130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/javascript/components/general/LinkedText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 225b130

Please sign in to comment.