Add support for web links
This commit is contained in:
parent
9d13e05dbf
commit
6e2b7a0b90
4 changed files with 67 additions and 30 deletions
|
@ -108,7 +108,7 @@ export const ComposePost = observer(function ComposePost({
|
|||
: undefined
|
||||
|
||||
const textDecorated = useMemo(() => {
|
||||
const re = /(@[a-z0-9\.]*)/gi
|
||||
const re = /(@[a-z0-9\.]*)|(https?:\/\/[\S]+)/gi
|
||||
const segments = []
|
||||
let match
|
||||
let start = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue