diff --git a/src/components/note/note-contents.tsx b/src/components/note/note-contents.tsx index 095c66fd3..9f34a842d 100644 --- a/src/components/note/note-contents.tsx +++ b/src/components/note/note-contents.tsx @@ -47,7 +47,8 @@ const embeds: EmbedType[] = [ }, // Twitter tweet { - regexp: /https?:\/\/twitter\.com\/(?:\#!\/)?(\w+)\/status(es)?\/(\d+)[^\s]*/im, + regexp: + /https?:\/\/twitter\.com\/(?:\#!\/)?(\w+)\/status(es)?\/(\d+)(\??(?:[\?#\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?/im, render: (match) => , name: "Tweet", isMedia: true, @@ -96,7 +97,7 @@ const embeds: EmbedType[] = [ }, // Youtube Music { - regexp: /https?:\/\/music\.youtube\.com\/watch\?v=(\w+)[^\s]*/, + regexp: /https?:\/\/music\.youtube\.com\/watch\?v=(\w+)(\??(?:[\?#\-\+=&;%@\.\w_]*)#?(?:[\.\!\/\\\w]*))?/, render: (match) => (