Methods
B
H
N
P
Class Public methods
new(options={})
# File guides/rails_guides/markdown/renderer.rb, line 4
def initialize(options={})
  super
end
Instance Public methods
block_code(code, language)
# File guides/rails_guides/markdown/renderer.rb, line 8
      def block_code(code, language)
        <<-HTML
<div class="code_container">
<pre class="brush: #{brush_for(language)}; gutter: false; toolbar: false">
#{ERB::Util.h(code)}
</pre>
</div>
HTML
      end
header(text, header_level)
# File guides/rails_guides/markdown/renderer.rb, line 18
def header(text, header_level)
  # Always increase the heading level by, so we can use h1, h2 heading in the document
  header_level += 1

  %Q(<h#{header_level}>#{text}</h#{header_level}>)
end
paragraph(text)
# File guides/rails_guides/markdown/renderer.rb, line 25
def paragraph(text)
  if text =~ /^(TIP|IMPORTANT|CAUTION|WARNING|NOTE|INFO|TODO)[.:](.*?)/
    convert_notes(text)
  elsif text =~ /^\[<sup>(\d+)\]:<\/sup> (.+)$/
    linkback = %Q(<a href="#footnote-#{$1}-ref"><sup>#{$1}</sup></a>)
    %Q(<p class="footnote" id="footnote-#{$1}">#{linkback} #{$2}</p>)
  else
    text = convert_footnotes(text)
    "<p>#{text}</p>"
  end
end