diff options
author | murphy <murphy@rubychan.de> | 2009-10-19 17:23:27 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2009-10-19 17:23:27 +0000 |
commit | 98cd8c95c53d7865db469f742c541f274057770a (patch) | |
tree | f472973e12d40129505af46eb5d721d219a4d6ba /lib/coderay | |
parent | b8ffbc27640f3f2a2d6a30a9a340cbe939e0c99c (diff) | |
download | coderay-98cd8c95c53d7865db469f742c541f274057770a.tar.gz |
Updated JSON scanner: false, null, true are highlighted as :value now.
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/scanners/json.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/coderay/scanners/json.rb b/lib/coderay/scanners/json.rb index d899e05..a9926b2 100644 --- a/lib/coderay/scanners/json.rb +++ b/lib/coderay/scanners/json.rb @@ -8,8 +8,13 @@ module Scanners register_for :json file_extension 'json' + KINDS_NOT_LOC = [ + :float, :char, :content, :delimiter, + :error, :integer, :operator, :value, + ] + CONSTANTS = %w( true false null ) - IDENT_KIND = WordList.new(:key).add(CONSTANTS, :reserved) + IDENT_KIND = WordList.new(:key).add(CONSTANTS, :value) ESCAPE = / [bfnrt\\"\/] /x UNICODE_ESCAPE = / u[a-fA-F0-9]{4} /x |