mirror of
https://github.com/zoriya/flood.git
synced 2026-06-03 03:12:14 +00:00
LinkedText: drop RegEx incompatible with Safari
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user