diff options
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 |