Class: Redcarpet::Render::StripDown
- Defined in:
- lib/redcarpet/render_strip.rb
Overview
Markdown-stripping renderer. Turns Markdown into plaintext Thanks to @toupeira (Markus Koller)
Instance Method Summary collapse
- #header(text, header_level) ⇒ Object
- #image(link, title, content) ⇒ Object
-
#link(link, title, content) ⇒ Object
Other methods where we don’t return only a specific argument.
- #paragraph(text) ⇒ Object
Methods inherited from Base
Constructor Details
This class inherits a constructor from Redcarpet::Render::Base
Instance Method Details
#header(text, header_level) ⇒ Object
43 44 45 |
# File 'lib/redcarpet/render_strip.rb', line 43 def header(text, header_level) text + "\n" end |
#image(link, title, content) ⇒ Object
34 35 36 37 |
# File 'lib/redcarpet/render_strip.rb', line 34 def image(link, title, content) content &&= content + " " "#{content}#{link}" end |
#link(link, title, content) ⇒ Object
Other methods where we don’t return only a specific argument
30 31 32 |
# File 'lib/redcarpet/render_strip.rb', line 30 def link(link, title, content) "#{content} (#{link})" end |
#paragraph(text) ⇒ Object
39 40 41 |
# File 'lib/redcarpet/render_strip.rb', line 39 def paragraph(text) text + "\n" end |