diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2013-06-23 14:53:14 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2013-06-23 14:53:14 +0200 |
commit | b89caf96d1cfc304c2114d8734ebe8b91337c799 (patch) | |
tree | bcf72f68d74d500defd359d05449fdd91f28a08f /lib | |
parent | 844975b53233b4697d1385548c1295ce18a7be72 (diff) | |
download | coderay-b89caf96d1cfc304c2114d8734ebe8b91337c799.tar.gz |
fix diff/json token nesting issue
Diffstat (limited to 'lib')
-rw-r--r-- | lib/coderay/scanners/json.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/coderay/scanners/json.rb b/lib/coderay/scanners/json.rb index 3754a9b..b09970c 100644 --- a/lib/coderay/scanners/json.rb +++ b/lib/coderay/scanners/json.rb @@ -26,6 +26,10 @@ module Scanners def scan_tokens encoder, options state = options[:state] || @state + if [:string, :key].include? state + encoder.begin_group state + end + until eos? case state |