From 417171cfe168da0381b9f7869b18706bc2e0349b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=2E=20Sch=C3=A4fer?= Date: Tue, 6 Jan 2015 21:51:59 +0100 Subject: [PATCH] Don't pass JSON-files through csonc --- script/convert-grammars | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/convert-grammars b/script/convert-grammars index af6f50dc..4b16dff4 100755 --- a/script/convert-grammars +++ b/script/convert-grammars @@ -148,10 +148,12 @@ def load_grammar(path) case File.extname(path.downcase) when '.plist', '.tmlanguage' Plist::parse_xml(path) - when '.cson', '.json' + when '.cson' cson = `"#{CSONC}" "#{path}"` raise "Failed to convert CSON grammar '#{path}': #{$?.to_s}" unless $?.success? JSON.parse(cson) + when '.json' + JSON.parse(File.read(path)) else raise "Invalid document type #{path}" end