summaryrefslogtreecommitdiff
path: root/lib/coderay/tokens.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-09 07:27:56 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-09 07:27:56 +0200
commit444054629e31bd69ee697586348572998e93bdab (patch)
tree2a1753f85d5c14f72eaf701628e5e50b42cab328 /lib/coderay/tokens.rb
parent0e4858322bfc969bde1b02cab3113940654acf31 (diff)
parent737fb3608c92506a573a79f611b94ff5d5da18e6 (diff)
downloadcoderay-444054629e31bd69ee697586348572998e93bdab.tar.gz
Merge branch 'master' into sass-scanner
Conflicts: lib/coderay/scanners/css.rb
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