module RedCloth::Formatters::Base
Public Instance Methods
ignore(opts)
click to toggle source
# File lib/redcloth/formatters/base.rb, line 4 def ignore(opts) opts[:text] end
Also aliased as: notextile
inline_redcloth_version(opts)
click to toggle source
# File lib/redcloth/formatters/base.rb, line 13 def inline_redcloth_version(opts) RedCloth::VERSION::STRING end
redcloth_version(opts)
click to toggle source
# File lib/redcloth/formatters/base.rb, line 9 def redcloth_version(opts) p(:text => "#{opts[:prefix]}#{RedCloth::VERSION}") end
Private Instance Methods
after_transform(text)
click to toggle source
# File lib/redcloth/formatters/base.rb, line 54 def after_transform(text) end
before_transform(text)
click to toggle source
# File lib/redcloth/formatters/base.rb, line 50 def before_transform(text) end
formatter_methods()
click to toggle source
# File lib/redcloth/formatters/base.rb, line 58 def formatter_methods singleton_methods.map! {|method| method.to_sym } end
method_missing(method, opts)
click to toggle source
# File lib/redcloth/formatters/base.rb, line 46 def method_missing(method, opts) opts[:text] || "" end
pba(opts)
click to toggle source
# File lib/redcloth/formatters/base.rb, line 26 def pba(opts) opts.delete(:style) if filter_styles opts.delete(:class) if filter_classes opts.delete(:id) if filter_ids atts = '' opts[:"text-align"] = opts.delete(:align) opts[:style] += ';' if opts[:style] && (opts[:style][-1..-1] != ';') [:float, :"text-align", :"vertical-align"].each do |a| opts[:style] = "#{a}:#{opts[a]};#{opts[:style]}" if opts[a] end [:"padding-right", :"padding-left"].each do |a| opts[:style] = "#{a}:#{opts[a]}em;#{opts[:style]}" if opts[a] end [:style, :class, :lang, :id, :colspan, :rowspan, :title, :start, :align].each do |a| atts << " #{a}=\"#{ html_esc(opts[a].to_s, :html_escape_attributes) }\"" if opts[a] end atts end