This method is deprecated or moved on the latest stable version.
The last existing version (v1_8_7_330) is shown here.
add_list_breaks()
private
now insert start/ends between list entries at the same level that have
different element types
# File lib/rdoc/markup/simple_markup/fragments.rb, line 276
def add_list_breaks
res = @fragments
@fragments = []
list_stack = []
res.each do |fragment|
case fragment
when ListStart
list_stack.push fragment
when ListEnd
start = list_stack.pop
fragment.type = start.type
when ListItem
l = list_stack.last
if fragment.type != l.type
@fragments << ListEnd.new(l.level, l.type)
start = ListStart.new(l.level, fragment.param, fragment.type)
@fragments << start
list_stack.pop
list_stack.push start
end
else
;
end
@fragments << fragment
end
end