summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/encoders')
-rw-r--r--lib/coderay/encoders/debug.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/coderay/encoders/debug.rb b/lib/coderay/encoders/debug.rb
index 95d6138..62f9f0a 100644
--- a/lib/coderay/encoders/debug.rb
+++ b/lib/coderay/encoders/debug.rb
@@ -28,7 +28,7 @@ module Encoders
@out << text
else
# TODO: Escape (
- text = text.gsub(/[)\\]/, '\\\\\0') # escape ) and \
+ text = text.gsub(/[)\\]/, '\\\\\0') if text.index(/[)\\]/)
@out << kind.to_s << '(' << text << ')'
end
end