summaryrefslogtreecommitdiff
path: root/lib/coderay/tokens.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-10 01:44:16 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-10 01:44:16 +0200
commit4ffc0afac656bef8a897023711cad7f3ca92a5fc (patch)
tree6637d5a2f48078d9db6459e73306402c4ee4dddb /lib/coderay/tokens.rb
parent02e1bf3c236778197627fe9f9a7b3cf126825a8b (diff)
parent2de5dab7d59021622dabf4728e0b8123dc29da8a (diff)
downloadcoderay-4ffc0afac656bef8a897023711cad7f3ca92a5fc.tar.gz
Merge branch 'master' into bash-scanner
Diffstat (limited to 'lib/coderay/tokens.rb')
-rw-r--r--lib/coderay/tokens.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/coderay/tokens.rb b/lib/coderay/tokens.rb
index c747017..6957d69 100644
--- a/lib/coderay/tokens.rb
+++ b/lib/coderay/tokens.rb
@@ -93,6 +93,7 @@ module CodeRay
# This method is used by @Scanner#tokenize@ when called with an Array
# of source strings. The Diff encoder uses it for inline highlighting.
def split_into_parts *sizes
+ return Array.new(sizes.size) { Tokens.new } if size == 2 && first == ''
parts = []
opened = []
content = nil