From be41f7f473070d00302d1a485819248f3b114fc4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 7 Nov 2009 09:08:13 +0000 Subject: Upgrade Coderay to 0.9.0. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3014 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../coderay-0.9.0/lib/coderay/encoders/json.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 vendor/plugins/coderay-0.9.0/lib/coderay/encoders/json.rb (limited to 'vendor/plugins/coderay-0.9.0/lib/coderay/encoders/json.rb') diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/json.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/json.rb new file mode 100644 index 000000000..6d789c6d5 --- /dev/null +++ b/vendor/plugins/coderay-0.9.0/lib/coderay/encoders/json.rb @@ -0,0 +1,19 @@ +module CodeRay +module Encoders + + # = JSON Encoder + class JSON < Encoder + + register_for :json + FILE_EXTENSION = 'json' + + protected + def compile tokens, options + require 'json' + @out = tokens.to_a.to_json + end + + end + +end +end -- cgit v1.2.3