Class: CVGen::Parser

Inherits:
Kramdown::Parser::Kramdown
  • Object
show all
Defined in:
lib/cvgen/parser.rb

Instance Method Summary collapse

Instance Method Details

#handle_extension(name, *args) ⇒ Object



23
24
25
26
27
# File 'lib/cvgen/parser.rb', line 23

def handle_extension name, *args
  return super unless name == 'pgbr'
  @tree.children << Element.new(:pgbr, nil, nil, :location => @src.current_line_number)
  true
end

#parse_atx_headerObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/cvgen/parser.rb', line 9

def parse_atx_header
  rval = super

  if rval
    @tree.children.last.options['date'] = @src[4]
    if @src[5]
      @tree.children.last.children << Element.new(:br, nil, nil, :location => @src.current_line_number)
      add_text(@src[5], @tree.children.last) 
    end
  end

  rval
end