Sha256: 511fee604c79e64a18347439be19260f8d54292c11bb8746dad6ff074665d93c

Contents?: true

Size: 191 Bytes

Versions: 3

Compression:

Stored size: 191 Bytes

Contents

AutoHtml.add_filter(:youtube_image) do |text|
   text.gsub(/http:\/\/(www.)?youtube\.com\/watch\?v=([A-Za-z0-9._%-]*)(\&\S+)?/) do
     "http://i1.ytimg.com/vi/#{$2}/default.jpg"
   end
 end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
marcosinger-auto_html-1.3.6 lib/auto_html/filters/youtube_image.rb
marcosinger-auto_html-1.3.5 lib/auto_html/filters/youtube_image.rb
marcosinger-auto_html-1.3.4 lib/auto_html/filters/youtube_image.rb