File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 33# Outputs RDoc markup as RDoc markup! (mostly)
44
55class RDoc ::Markup ::ToRdoc < RDoc ::Markup ::Formatter
6+ DEFAULT_HEADINGS = {
7+ 1 => [ '= ' , '' ] ,
8+ 2 => [ '== ' , '' ] ,
9+ 3 => [ '=== ' , '' ] ,
10+ 4 => [ '==== ' , '' ] ,
11+ 5 => [ '===== ' , '' ] ,
12+ 6 => [ '====== ' , '' ]
13+ }
14+ DEFAULT_HEADINGS . default = [ ]
15+ DEFAULT_HEADINGS . freeze
616
717 ##
818 # Current indent amount for output in characters
@@ -49,16 +59,7 @@ def initialize markup = nil
4959 @width = 78
5060 init_tags
5161
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-
62+ @headings = DEFAULT_HEADINGS . dup
6263 @hard_break = "\n "
6364 end
6465
You can’t perform that action at this time.
0 commit comments