From 98cd8c95c53d7865db469f742c541f274057770a Mon Sep 17 00:00:00 2001 From: murphy Date: Mon, 19 Oct 2009 17:23:27 +0000 Subject: Updated JSON scanner: false, null, true are highlighted as :value now. --- lib/coderay/scanners/json.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/coderay') 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 -- cgit v1.2.1