Class: Sendmark::Markdown
- Inherits:
-
Object
- Object
- Sendmark::Markdown
- Defined in:
- lib/sendmark/markdown.rb
Instance Method Summary collapse
- #body_end_tag ⇒ Object
- #body_start_tag ⇒ Object
-
#initialize(css_parser) ⇒ Markdown
constructor
A new instance of Markdown.
- #render(text) ⇒ Object
Constructor Details
Instance Method Details
#body_end_tag ⇒ Object
23 24 25 |
# File 'lib/sendmark/markdown.rb', line 23 def body_end_tag "</body>" end |
#body_start_tag ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/sendmark/markdown.rb', line 13 def body_start_tag style = @css_parser.body unless style.nil? "<body style=\"#{style}\">" else "<body>" end end |
#render(text) ⇒ Object
9 10 11 |
# File 'lib/sendmark/markdown.rb', line 9 def render(text) "#{body_start_tag}#{@markdown.render(text)}#{body_end_tag}" end |