summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/html.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2017-11-02 23:25:41 +0100
committerKornelius Kalnbach <murphy@rubychan.de>2017-11-02 23:25:41 +0100
commit853787554d17570dace133340e3ec555b0e56e0d (patch)
treec3fe74694c0ea315d7df7d8d35869df61b1191bb /lib/coderay/encoders/html.rb
parentffdd9ddb5cb5ab19a04ee0a714fa08d8d70f3437 (diff)
parente15cf96405177153e1418496a7a8e85beaa679fb (diff)
downloadcoderay-853787554d17570dace133340e3ec555b0e56e0d.tar.gz
Merge branch 'master' into possible-speedups
Diffstat (limited to 'lib/coderay/encoders/html.rb')
-rw-r--r--lib/coderay/encoders/html.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb
index 0365022..5d55b00 100644
--- a/lib/coderay/encoders/html.rb
+++ b/lib/coderay/encoders/html.rb
@@ -161,7 +161,7 @@ module Encoders
if options[:wrap] || options[:line_numbers]
@real_out = @out
- @out = ''
+ @out = ''.dup
end
@break_lines = (options[:break_lines] == true)
@@ -297,7 +297,7 @@ module Encoders
end
def break_lines text, style
- reopen = ''
+ reopen = ''.dup
@opened.each_with_index do |kind, index|
reopen << (@span_for_kinds[index > 0 ? [kind, *@opened[0...index]] : kind] || '<span>')
end