Sha256: 1f1acc3dd51af46c39ea134f3813fa0352fbfcb0bea90026cfb010891db466bd
Contents?: true
Size: 446 Bytes
Versions: 2
Compression:
Stored size: 446 Bytes
Contents
module Publishr class KramdownProcessor def self.convert(html) sanitized_html = HtmlProcessor.sanitize(html) lines = Kramdown::Document.new(sanitized_html, :input => 'html', :line_width => 100000 ).to_kramdown.split("\n") processed_lines = [] lines.each do |line| line.gsub! '\"', '"' line.gsub! "\\'", "'" processed_lines << line end processed_lines.join("\n") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
publishr-0.5.9 | lib/publishr/kramdown_processor.rb |
publishr-0.5.8 | lib/publishr/kramdown_processor.rb |