1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  class RenderProcessor #< RenderProcessor
  
  def open_tag name, position
     @stack << name
     print escape(@line[@position...position].gsub(/\n|\r/, '')) if position > @position
     @position = position
     opt = options @stack
     print "<span class='#{name_to_class(name)}'>"
  end
  
  def name_to_class(name)
    cl=""
    tags=name.split(".")
    (0..tags.length-1).each do |i|
      cl << tags[0..i].join("_")
      cl << " "
    end
    cl.strip
  end