Skip to content

Commit

Permalink
Fix bug in slides filter
Browse files Browse the repository at this point in the history
It attempts to wrap h1 elements in a div.slides, but was failing if the
h1 had any attributes.

Signed-off-by: Tim Pease <tim.pease+github@gmail.com>
  • Loading branch information
paul authored and Tim Pease committed Feb 5, 2009
1 parent 795bba5 commit e49385f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/webby/filters/slides.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def initialize( str )
def filter
result = []

@str.split(%r/\<h1\>/i).each do |slide|
@str.split(%r/\<h1/i).each do |slide|
next if slide.strip.empty?
result << START_SLIDE << '<h1>' << slide << END_SLIDE
result << START_SLIDE << '<h1' << slide << END_SLIDE
end

result.join
Expand Down

0 comments on commit e49385f

Please sign in to comment.