7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/slideshow/filters/slide_filter.rb', line 7
def takahashi_slide_breaks( content )
inline_count = 0
line_count = 0
content.gsub!( /\b[ ]+\/{2}[ ]+\b/) do |match|
inline_count += 1
"\n\n<!-- _S9SLIDE_ -->\n\n"
end
content.gsub!( /^[ ]*\/{2}[ ]*$/ ) do |match|
line_count += 1
"\n\n<!-- _S9SLIDE_ -->\n\n"
end
puts " Adding #{inline_count+line_count} takahashi slide breaks (#{inline_count} //-inline, #{line_count} //-line)..."
content
end
|