File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change 3
3
# Outputs RDoc markup as RDoc markup! (mostly)
4
4
5
5
class RDoc ::Markup ::ToRdoc < RDoc ::Markup ::Formatter
6
+ DEFAULT_HEADINGS = {
7
+ 1 => [ '= ' , '' ] ,
8
+ 2 => [ '== ' , '' ] ,
9
+ 3 => [ '=== ' , '' ] ,
10
+ 4 => [ '==== ' , '' ] ,
11
+ 5 => [ '===== ' , '' ] ,
12
+ 6 => [ '====== ' , '' ]
13
+ } . tap { |h | h . default = [ ] } . freeze
6
14
7
15
##
8
16
# Current indent amount for output in characters
@@ -49,16 +57,7 @@ def initialize markup = nil
49
57
@width = 78
50
58
init_tags
51
59
52
- @headings = { }
53
- @headings . default = [ ]
54
-
55
- @headings [ 1 ] = [ '= ' , '' ]
56
- @headings [ 2 ] = [ '== ' , '' ]
57
- @headings [ 3 ] = [ '=== ' , '' ]
58
- @headings [ 4 ] = [ '==== ' , '' ]
59
- @headings [ 5 ] = [ '===== ' , '' ]
60
- @headings [ 6 ] = [ '====== ' , '' ]
61
-
60
+ @headings = DEFAULT_HEADINGS . dup
62
61
@hard_break = "\n "
63
62
end
64
63
You can’t perform that action at this time.
0 commit comments