mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
fixed youtube split regexp
This commit is contained in:
parent
bc7443dd2e
commit
cb8e39c707
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ import { flatten, isEmpty } from 'ramda';
|
|||
export const splitTextByYoutube = (strings: string[]): string[] =>
|
||||
flatten(
|
||||
strings.map(str =>
|
||||
str.split(/(https?:\/\/(?:www\.)(?:youtube\.com|youtu\.be)\/(?:watch)(?:\?v=)[\w\-\&\=]+)/)
|
||||
str.split(/(https?:\/\/(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch)?(?:\?v=)?[\w\-\&\=]+)/)
|
||||
)
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue