Outputs RDoc markup with vibrant ANSI color!
# File lib/rdoc/markup/to_ansi.rb, line 26
26: def accept_list_item_end list_item
27: width = case @list_type.last
28: when :BULLET then
29: 2
30: when :NOTE, :LABEL then
31: @res << "\n"
32: 2
33: else
34: bullet = @list_index.last.to_s
35: @list_index[1] = @list_index.last.succ
36: bullet.length + 2
37: end
38:
39: @indent -= width
40: end
# File lib/rdoc/markup/to_ansi.rb, line 42
42: def accept_list_item_start list_item
43: bullet = case @list_type.last
44: when :BULLET then
45: '*'
46: when :NOTE, :LABEL then
47: attributes(list_item.label) + ":\n"
48: else
49: @list_index.last.to_s + '.'
50: end
51:
52: case @list_type.last
53: when :NOTE, :LABEL then
54: @indent += 2
55: @prefix = bullet + (' ' * @indent)
56: else
57: @prefix = (' ' * @indent) + bullet.ljust(bullet.length + 1)
58:
59: width = bullet.gsub(/\e\[[\d;]*m/, '').length + 1
60:
61: @indent += width
62: end
63: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.