Method: RDoc::Markdown::Literals#position_line_offsets

Defined in:
lib/rdoc/markdown/literals.rb

#position_line_offsetsObject



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/rdoc/markdown/literals.rb', line 50

def position_line_offsets
  unless @position_line_offsets
    @position_line_offsets = []
    total = 0
    string.each_line do |line|
      total += line.size
      @position_line_offsets << total
    end
  end
  @position_line_offsets
end