This method is deprecated or moved on the latest stable version.
The last existing version (v1_8_7_330) is shown here.
group_lines()
private
Return a block consisting of fragments which are paragraphs, list entries
or verbatim text. We merge consecutive lines of the same type and level
together. We are also slightly tricky with lists: the lines following a
list introduction look like paragraph lines at the next level, and we remap
them into list entries instead
# File lib/rdoc/markup/simple_markup.rb, line 435
def group_lines
@lines.rewind
inList = false
wantedType = wantedLevel = nil
block = LineCollection.new
group = nil
while line = @lines.next
if line.level == wantedLevel and line.type == wantedType
group.add_text(line.text)
else
group = block.fragment_for(line)
block.add(group)
if line.type == Line::LIST
wantedType = Line::PARAGRAPH
else
wantedType = line.type
end
wantedLevel = line.type == Line::HEADING ? line.param : line.level
end
end
block.normalize
block
end