class Tomify::Markdown::HTML

Public Instance Methods

image(url, title, alt) click to toggle source
# File lib/tomify/markdown.rb, line 9
def image(url, title, alt)
  "<img alt=\"#{alt}\" class=\"center-block img-responsive\" src=\"#{url}\" title=\"#{title}\">"
end
preprocess(text) click to toggle source
# File lib/tomify/markdown.rb, line 4
def preprocess(text)
  text = find_and_replace(text) if @options[:replace]
  text
end

Private Instance Methods

find_and_replace(text) click to toggle source
# File lib/tomify/markdown.rb, line 14
def find_and_replace(text)
  text.gsub(/!!\w+!!/) { |t| @options[:replace][t[2...-2]] }
end