Class: RD::RD2tDiaryCHTMLVistor

Inherits:
RD2tDiaryVisitor show all
Defined in:
lib/tdiary/style/rd.rb

Instance Method Summary collapse

Methods inherited from RD2tDiaryVisitor

#apply_to_DescListItem, #apply_to_DocumentElement, #apply_to_Footnote, #apply_to_Index, #apply_to_Keyboard, #apply_to_MethodList, #apply_to_MethodListItem, #apply_to_RefToElement, #initialize

Constructor Details

This class inherits a constructor from RD::RD2tDiaryVisitor

Instance Method Details

#apply_to_Headline(element, title) ⇒ Object



161
162
163
164
165
166
167
168
169
170
# File 'lib/tdiary/style/rd.rb', line 161

def apply_to_Headline(element, title)
  level = element.level + TDIARY_BASE_LEVEL
  title = title.join
  if level == 3
    r = %Q[<H#{level}><%= subtitle_proc( Time::at( #{@td_date.to_i} ), #{title.to_s.dump.gsub( /%/, '\\\\045' )} ) %></H#{level}>]
  else
    r = %Q[<H#{level}>#{title}</H#{level}>]
  end
  r
end