Sha256: f58b1c264669c65e352796ff56377e172bbe1943fec97b618ee9618a575a4386
Contents?: true
Size: 436 Bytes
Versions: 9
Compression:
Stored size: 436 Bytes
Contents
module Publishr class KramdownProcessor def self.convert(html,image_url_prefix) sanitized_html = HtmlProcessor.sanitize(html) kramdown = Kramdown::Document.new(sanitized_html, :input => 'html', :line_width => 100000 ).to_kramdown kramdown.gsub!(/\!\[(.*?)\]\((.*?)\)/){ "![#{$1}](#{image_url_prefix}#{$2})" } kramdown.gsub! '\"', '"' kramdown.gsub! "\\'", "'" return kramdown end end end
Version data entries
9 entries across 9 versions & 1 rubygems