dejan / auto_html-contrib

More filters for `auto_html` gem
MIT License
2 stars 6 forks source link

Do not transform vimeo or youtube url inside anchor tag #3

Open pomartel opened 6 years ago

pomartel commented 6 years ago

This pull request fixes the vimeo and youtube script to make sure that URLs inside anchor tags are not transformed. Such as this for example:

<a href="http://www.vimeo.com/3300155">vimeo</a>

I wasn't able to tweak the Youtube regex properly since the http is optional, which mesk . So I had to come up with something a bit more convoluted.