summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners/json.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/scanners/json.rb')
-rw-r--r--lib/coderay/scanners/json.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/coderay/scanners/json.rb b/lib/coderay/scanners/json.rb
index ae941a0..eb67347 100644
--- a/lib/coderay/scanners/json.rb
+++ b/lib/coderay/scanners/json.rb
@@ -34,11 +34,11 @@ module Scanners
elsif match = scan(/ [:,\[{\]}] /x)
kind = :operator
case match
- when '{': stack << :object; key_expected = true
- when '[': stack << :array
- when ':': key_expected = false
- when ',': key_expected = true if stack.last == :object
- when '}', ']': stack.pop # no error recovery, but works for valid JSON
+ when '{' then stack << :object; key_expected = true
+ when '[' then stack << :array
+ when ':' then key_expected = false
+ when ',' then key_expected = true if stack.last == :object
+ when '}', ']' then stack.pop # no error recovery, but works for valid JSON
end
elsif match = scan(/ true | false | null /x)
kind = IDENT_KIND[match]