@@ -47,7 +47,8 @@ module Encoders
47
47
#
48
48
# Default: 'CodeRay output'
49
49
#
50
- # === :independent_lines
50
+ # === :break_lines
51
+ #
51
52
# Split multiline blocks at line breaks.
52
53
# Forced to true if :line_numbers option is set to :inline.
53
54
#
@@ -106,7 +107,7 @@ class HTML < Encoder
106
107
:wrap => nil ,
107
108
:title => 'CodeRay output' ,
108
109
109
- :independent_lines => false ,
110
+ :break_lines => false ,
110
111
111
112
:line_numbers => nil ,
112
113
:line_number_anchors => 'n' ,
@@ -176,9 +177,9 @@ def setup options
176
177
@out = ''
177
178
end
178
179
179
- options [ :independent_lines ] = true if options [ :line_numbers ] == :inline
180
+ options [ :break_lines ] = true if options [ :line_numbers ] == :inline
180
181
181
- @independent_lines = ( options [ :independent_lines ] == true )
182
+ @break_lines = ( options [ :break_lines ] == true )
182
183
183
184
@HTML_ESCAPE = HTML_ESCAPE . dup
184
185
@HTML_ESCAPE [ "\t " ] = ' ' * options [ :tab_width ]
@@ -260,7 +261,7 @@ def text_token text, kind
260
261
261
262
style = @span_for_kind [ @last_opened ? [ kind , *@opened ] : kind ]
262
263
263
- if @independent_lines && ( i = text . index ( "\n " ) ) && ( c = @opened . size + ( style ? 1 : 0 ) ) > 0
264
+ if @break_lines && ( i = text . index ( "\n " ) ) && ( c = @opened . size + ( style ? 1 : 0 ) ) > 0
264
265
close = '</span>' * c
265
266
reopen = ''
266
267
@opened . each_with_index do |k , index |
0 commit comments