ritz078 / embed-js

🌻 A lightweight plugin to embed emojis, media, maps, tweets, code and more. ✨
https://codesandbox.io/s/Wp5OlNMn
MIT License
1.27k stars 89 forks source link

YouTube plugin not correctly parsing full urls #267

Open vinnyvimto opened 6 years ago

vinnyvimto commented 6 years ago

Using the YouTube plugin the url https://www.youtube.com/watch?v=example&t=6s is not parsed correctly.

The only part passed is youtube.com/watch?v=example leaving the embedded video wrapped in https:// and &t=6s

ritz078 commented 5 years ago

This package currently uses https://github.com/regexhq/youtube-regex for parsing the urls. Would you be willing to make a change and submit a PR ?

The line that needs to be changed is https://github.com/ritz078/embed-js/blob/5a58be79ce45497a66e2ef41d3644e3272c0ee19/packages/embed-plugin-youtube/src/index.js#L76