Method: Slideshow::Gen#render

Defined in:
lib/slideshow/commands/gen.rb

#render(content, ctx) ⇒ Object



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/slideshow/commands/gen.rb', line 29

def render( content, ctx )
  
  ####################
  ## todo/fix: move ctx to Gen.initialize - why? why not?
  @name     = ctx[:name]

  @outdir   = ctx[:outdir]
  @srcdir   = ctx[:srcdir]
  @usrdir   = ctx[:usrdir]
  
  # run text filters

  config.text_filters.each do |filter|
    mn = filter.tr( '-', '_' ).to_sym  # construct method name (mn)
    puts "  run filter #{mn}..."
    content = send( mn, content )   # call filter e.g.  include_helper_hack( content )  
  end

  if config.takahashi?
    content = takahashi_slide_breaks( content )
  end

  # convert light-weight markup to hypertext

  content = markdown_to_html( content )
  content
end