Method: Bhook::Converter::Html#convert_header

Defined in:
lib/bhook/converter/html.rb

#convert_header(el, indent) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/bhook/converter/html.rb', line 26

def convert_header(el, indent)
  src_title = el.options[:raw_text]
  after_h1_html = @options[:after_h1_strategy].call(binding)

  level = output_header_level(el.options[:level])
  if level == 1
    @options[:h1_callback].call(src_title)
    "#{super(el, indent)}#{' ' * indent}#{after_h1_html}"
  else
    insert_anchor_into_header!(el)
    super(el, indent)
  end
end