module RedCloth::Formatters::Base
Public Instance Methods
Source
# File lib/redcloth/formatters/base.rb 4 def ignore(opts) 5 opts[:text] 6 end
Also aliased as: notextile
Source
# File lib/redcloth/formatters/base.rb 13 def inline_redcloth_version(opts) 14 RedCloth::VERSION::STRING 15 end
Source
# File lib/redcloth/formatters/base.rb 9 def redcloth_version(opts) 10 p(:text => "#{opts[:prefix]}#{RedCloth::VERSION}") 11 end
Private Instance Methods
Source
# File lib/redcloth/formatters/base.rb 54 def after_transform(text) 55 56 end
Source
# File lib/redcloth/formatters/base.rb 50 def before_transform(text) 51 52 end
Source
# File lib/redcloth/formatters/base.rb 58 def formatter_methods 59 singleton_methods.map! {|method| method.to_sym } 60 end
Source
# File lib/redcloth/formatters/base.rb 46 def method_missing(method, opts) 47 opts[:text] || "" 48 end
Source
# File lib/redcloth/formatters/base.rb 26 def pba(opts) 27 opts.delete(:style) if filter_styles 28 opts.delete(:class) if filter_classes 29 opts.delete(:id) if filter_ids 30 31 atts = '' 32 opts[:"text-align"] = opts.delete(:align) 33 opts[:style] += ';' if opts[:style] && (opts[:style][-1..-1] != ';') 34 [:float, :"text-align", :"vertical-align"].each do |a| 35 opts[:style] = "#{a}:#{opts[a]};#{opts[:style]}" if opts[a] 36 end 37 [:"padding-right", :"padding-left"].each do |a| 38 opts[:style] = "#{a}:#{opts[a]}em;#{opts[:style]}" if opts[a] 39 end 40 [:style, :class, :lang, :id, :colspan, :rowspan, :title, :start, :align].each do |a| 41 atts << " #{a}=\"#{ html_esc(opts[a].to_s, :html_escape_attributes) }\"" if opts[a] 42 end 43 atts 44 end