mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-03-17 21:31:43 +01:00
improve youtube regexp
This commit is contained in:
parent
af325b6ec0
commit
0545c57603
@ -22,7 +22,7 @@ const embeds: { regexp: RegExp; render: (match: RegExpMatchArray, trusted: boole
|
||||
// Youtube Video
|
||||
{
|
||||
regexp:
|
||||
/^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube(-nocookie)?\.com|youtu.be))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?$/im,
|
||||
/((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube\.com|youtu\.be))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?/im,
|
||||
render: (match) => (
|
||||
<AspectRatio ratio={16 / 10} maxWidth="30rem">
|
||||
<iframe
|
||||
|
Loading…
x
Reference in New Issue
Block a user