172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
# File 'lib/org2slides.rb', line 172
def to_revealjs_html
mark_trees_for_export
export_options = {
:decorate_title => @in_buffer_settings["TITLE"],
:export_heading_number => export_heading_number?,
:export_todo => export_todo?,
:use_sub_superscripts => use_sub_superscripts?,
:export_footnotes => ,
:link_abbrevs => @link_abbrevs,
:skip_syntax_highlight => @parser_options[:skip_syntax_highlight],
:markup_file => @parser_options[:markup_file]
}
export_options[:skip_tables] = true if not export_tables?
output = ""
output_buffer = RevealJsHtmlBuffer.new(output, export_options)
if @in_buffer_settings["TITLE"]
title = Line.new(@in_buffer_settings["TITLE"], self, :title)
translate_to_slides([title], output_buffer)
end
translate_to_slides(@header_lines, output_buffer) unless
export_options.delete(:decorate_title) if (output.length > 0)
@headlines.each do |headline|
next if headline.export_state == :exclude
case headline.export_state
when :exclude
when :headline_only
translate_to_slides(headline.body_lines[0, 1], output_buffer)
when :all
translate_to_slides(headline.body_lines, output_buffer)
end
end
output << "\n"
return output if @parser_options[:skip_rubypants_pass]
rp = RubyPants.new(output)
unclosed_html = rp.to_html
closed_html = unclosed_html << "END-SLIDE"
sectioned_html = closed_html.gsub("START-SLIDE", "\n<section>").gsub("END-SLIDE","\n</section>")
end
|