Class: Codex::SlidesProcessor
- Inherits:
-
PostProcessor
- Object
- PostProcessor
- Codex::SlidesProcessor
- Defined in:
- lib/codex/post_processors/01_slides_processor.rb
Overview
This will divide the html in slides, surrounding <hN> tags plus the following text in @<div class=“slide”>(…)</div>@.
Instance Attribute Summary
Attributes inherited from PostProcessor
Instance Method Summary collapse
Methods inherited from PostProcessor
Constructor Details
This class inherits a constructor from Codex::PostProcessor
Instance Method Details
#process ⇒ Object
5 6 7 |
# File 'lib/codex/post_processors/01_slides_processor.rb', line 5 def process @html = @html.gsub(/(<h{1,6}.*?)(?=<h{1,6}|\z)/m, "\n<div class=\"slide\">\\1</div>") end |