summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2012-04-02 00:15:20 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2012-04-02 00:15:20 +0200
commit5c4124559127f8ce991e31e4ea8a40516fe0757a (patch)
treef1d513f7ddb722bebd218115534921d203592c6a /lib/coderay/encoders
parentdf4e2bc7f7d8238f56e2d823aea707bfd860ad8f (diff)
downloadcoderay-5c4124559127f8ce991e31e4ea8a40516fe0757a.tar.gz
rename :independent_lines option to :break_lines
Diffstat (limited to 'lib/coderay/encoders')
-rw-r--r--lib/coderay/encoders/html.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb
index 2ec0f37..635a4d8 100644
--- a/lib/coderay/encoders/html.rb
+++ b/lib/coderay/encoders/html.rb
@@ -47,7 +47,8 @@ module Encoders
#
# Default: 'CodeRay output'
#
- # === :independent_lines
+ # === :break_lines
+ #
# Split multiline blocks at line breaks.
# Forced to true if :line_numbers option is set to :inline.
#
@@ -106,7 +107,7 @@ module Encoders
:wrap => nil,
:title => 'CodeRay output',
- :independent_lines => false,
+ :break_lines => false,
:line_numbers => nil,
:line_number_anchors => 'n',
@@ -176,9 +177,9 @@ module Encoders
@out = ''
end
- options[:independent_lines] = true if options[:line_numbers] == :inline
+ options[:break_lines] = true if options[:line_numbers] == :inline
- @independent_lines = (options[:independent_lines] == true)
+ @break_lines = (options[:break_lines] == true)
@HTML_ESCAPE = HTML_ESCAPE.dup
@HTML_ESCAPE["\t"] = ' ' * options[:tab_width]
@@ -260,7 +261,7 @@ module Encoders
style = @span_for_kind[@last_opened ? [kind, *@opened] : kind]
- if @independent_lines && (i = text.index("\n")) && (c = @opened.size + (style ? 1 : 0)) > 0
+ if @break_lines && (i = text.index("\n")) && (c = @opened.size + (style ? 1 : 0)) > 0
close = '</span>' * c
reopen = ''
@opened.each_with_index do |k, index|