summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/html.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2016-02-13 16:01:53 +0100
committerKornelius Kalnbach <murphy@rubychan.de>2016-02-13 16:01:53 +0100
commit5fdb49307543a218e4bc47e181003c77f181eccf (patch)
treeb29a9d9d99877980c8d29c33a11f838830859104 /lib/coderay/encoders/html.rb
parentd79c6ba2008bff7b65029bc50717ca679c43fb5f (diff)
parent0a1f500d524ff0fb5eeafef051ccbb641954a87a (diff)
downloadcoderay-5fdb49307543a218e4bc47e181003c77f181eccf.tar.gz
Merge branch 'master' into escape-utils
Diffstat (limited to 'lib/coderay/encoders/html.rb')
-rw-r--r--lib/coderay/encoders/html.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb
index 629950c..beb3703 100644
--- a/lib/coderay/encoders/html.rb
+++ b/lib/coderay/encoders/html.rb
@@ -26,7 +26,8 @@ module Encoders
# == Options
#
# === :tab_width
- # Convert \t characters to +n+ spaces (a number.)
+ # Convert \t characters to +n+ spaces (a number or false.)
+ # false will keep tab characters untouched.
#
# Default: 8
#
@@ -165,7 +166,7 @@ module Encoders
@break_lines = (options[:break_lines] == true)
- @expand_tab = ' ' * options[:tab_width]
+ @expand_tab = options[:tab_width] ? ' ' * options[:tab_width] : "\t"
@opened = []
@last_opened = nil