lib/training/wiki_slide_parser.rb
# Everything after the first translated line is the slide content
Everything after the first translated line is the slide content
Everything after the first translated line is the slide content
def content
    return '' if @wikitext.blank?
    wikitext = @wikitext.lines[1..-1].join 
    wikitext[0] = '' while wikitext[0] == "\n" 
    markdown = Wikitext.mediawiki_to_markdown(wikitext)
    markdown.gsub("figure>\n", "figure>\n\n")
  end
def content return '' if @wikitext . blank? wikitext = @wikitext . lines [ 1 .. - 1 ] . join wikitext [ 0 ] = '' while wikitext [ 0 ] == "\n" markdown = Wikitext . mediawiki_to_markdown ( wikitext ) markdown . gsub ( "figure>\n" , "figure>\n\n" ) end
Everything after the first translated line is the slide content
Everything after the first translated line is the slide content
# Line 0 is the title # Remove leading newlines # Make sure first line after a figure gets parsed as a new paragraph