Class: Codex::SlidesProcessor

Inherits:
PostProcessor show all
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

#html

Instance Method Summary collapse

Methods inherited from PostProcessor

#initialize, register

Constructor Details

This class inherits a constructor from Codex::PostProcessor

Instance Method Details

#processObject



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