diff options
author | murphy <murphy@rubychan.de> | 2011-06-22 07:22:23 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2011-06-22 07:22:23 +0000 |
commit | d6fe4e777a4f543c8828dbf77e955ab38e6c2803 (patch) | |
tree | 7f2a155c7645718f8936e649aee05574cd3d1b54 /lib/coderay/tokens.rb | |
parent | 90f70ee61e87e137aa192c5db97c382e1ec7d24b (diff) | |
download | coderay-d6fe4e777a4f543c8828dbf77e955ab38e6c2803.tar.gz |
#309 Improved highlighting of Ruby inside diffs
Diffstat (limited to 'lib/coderay/tokens.rb')
-rw-r--r-- | lib/coderay/tokens.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/coderay/tokens.rb b/lib/coderay/tokens.rb index e7da7e8..f6f8845 100644 --- a/lib/coderay/tokens.rb +++ b/lib/coderay/tokens.rb @@ -223,12 +223,15 @@ module CodeRay content_or_kind end end - parts << part.concat(closing) - part = Tokens.new + part.concat closing + begin + parts << part + part = Tokens.new + size = sizes[i += 1] + end until size.nil? || size > 0 # ...and open them again. part.concat opened.flatten part_size = 0 - size = sizes[i += 1] redo unless content.empty? else part << content << item |