summaryrefslogtreecommitdiff
path: root/lib/coderay/tokens.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-10 23:50:03 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-10 23:50:03 +0200
commit4540eb3ceb8882e28908073b20657b239ff2f878 (patch)
tree4d5d4f3a0f3929dfb8df7d3f2a318b1cac066a85 /lib/coderay/tokens.rb
parent8ad02d8bde0515636a63247a74098b4d819b7950 (diff)
parenta69d5d43b79a4f2cf5aaccc50b2275bf0dab4aba (diff)
downloadcoderay-4540eb3ceb8882e28908073b20657b239ff2f878.tar.gz
Merge branch 'master' into javascript-keep-state
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