Class: Zlide::Redcarpet::Renderers::HTML
- Inherits:
-
Redcarpet::Render::HTML
- Object
- Redcarpet::Render::HTML
- Zlide::Redcarpet::Renderers::HTML
- Defined in:
- lib/zlide/redcarpet/renderers/html.rb
Instance Method Summary collapse
- #doc_footer ⇒ Object
-
#initialize(options = {}) ⇒ HTML
constructor
A new instance of HTML.
- #paragraph(text) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ HTML
Returns a new instance of HTML.
7 8 9 10 |
# File 'lib/zlide/redcarpet/renderers/html.rb', line 7 def initialize( = {}) @slide_open = false super() end |
Instance Method Details
#doc_footer ⇒ Object
24 25 26 27 28 29 |
# File 'lib/zlide/redcarpet/renderers/html.rb', line 24 def if @slide_open @slide_open = false "</section>" end end |
#paragraph(text) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/zlide/redcarpet/renderers/html.rb', line 12 def paragraph(text) result = "" if text =~ /^!SLIDE/ result += "</section>\n" if @slide_open result += "<section class=\"slide\">\n" @slide_open = true else result += "<p>#{text}</p>\n" end result end |