Sha256: 1ee6bcca47d528479a54941275235dec24a24eafcae28bfafcd3f3d696eea282
Contents?: true
Size: 356 Bytes
Versions: 1
Compression:
Stored size: 356 Bytes
Contents
module Kramdown module Converter module Amp def convert_img(el, indent) img_src = el.attr["src"] img_src = img_src.slice(1..-1) if img_src.start_with?("/") w, h = FastImage.size(img_src) "<amp-img#{html_attributes(el.attr)} width='#{w}' height='#{h}' layout='responsive'></amp-img>" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kramdown-amp-0.0.1 | lib/kramdown/converter/amp.rb |