diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-11-07 09:08:13 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-11-07 09:08:13 +0000 |
commit | be41f7f473070d00302d1a485819248f3b114fc4 (patch) | |
tree | d51d116cc1e3b06f3ea67768470f7728af5e4952 /vendor/plugins/coderay-0.9.0/lib/coderay/token_classes.rb | |
parent | 3b9d8c2a72f64b451db700e2d3dba6bb46e070af (diff) | |
download | redmine-be41f7f473070d00302d1a485819248f3b114fc4.tar.gz redmine-be41f7f473070d00302d1a485819248f3b114fc4.zip |
Upgrade Coderay to 0.9.0.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3014 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor/plugins/coderay-0.9.0/lib/coderay/token_classes.rb')
-rw-r--r-- | vendor/plugins/coderay-0.9.0/lib/coderay/token_classes.rb | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/vendor/plugins/coderay-0.9.0/lib/coderay/token_classes.rb b/vendor/plugins/coderay-0.9.0/lib/coderay/token_classes.rb new file mode 100644 index 000000000..ae35c0f68 --- /dev/null +++ b/vendor/plugins/coderay-0.9.0/lib/coderay/token_classes.rb @@ -0,0 +1,86 @@ +module CodeRay + class Tokens + ClassOfKind = Hash.new do |h, k| + h[k] = k.to_s + end + ClassOfKind.update with = { + :annotation => 'at', + :attribute_name => 'an', + :attribute_name_fat => 'af', + :attribute_value => 'av', + :attribute_value_fat => 'aw', + :bin => 'bi', + :char => 'ch', + :class => 'cl', + :class_variable => 'cv', + :color => 'cr', + :comment => 'c', + :complex => 'cm', + :constant => 'co', + :content => 'k', + :decorator => 'de', + :definition => 'df', + :delimiter => 'dl', + :directive => 'di', + :doc => 'do', + :doctype => 'dt', + :doc_string => 'ds', + :entity => 'en', + :error => 'er', + :escape => 'e', + :exception => 'ex', + :float => 'fl', + :function => 'fu', + :global_variable => 'gv', + :hex => 'hx', + :imaginary => 'cm', + :important => 'im', + :include => 'ic', + :inline => 'il', + :inline_delimiter => 'idl', + :instance_variable => 'iv', + :integer => 'i', + :interpreted => 'in', + :keyword => 'kw', + :key => 'ke', + :label => 'la', + :local_variable => 'lv', + :modifier => 'mod', + :oct => 'oc', + :operator_fat => 'of', + :pre_constant => 'pc', + :pre_type => 'pt', + :predefined => 'pd', + :preprocessor => 'pp', + :pseudo_class => 'ps', + :regexp => 'rx', + :reserved => 'r', + :shell => 'sh', + :string => 's', + :symbol => 'sy', + :tag => 'ta', + :tag_fat => 'tf', + :tag_special => 'ts', + :type => 'ty', + :variable => 'v', + :value => 'vl', + :xml_text => 'xt', + + :insert => 'ins', + :delete => 'del', + :change => 'chg', + :head => 'head', + + :ident => :NO_HIGHLIGHT, # 'id' + #:operator => 'op', + :operator => :NO_HIGHLIGHT, # 'op' + :space => :NO_HIGHLIGHT, # 'sp' + :plain => :NO_HIGHLIGHT, + } + ClassOfKind[:method] = ClassOfKind[:function] + ClassOfKind[:open] = ClassOfKind[:close] = ClassOfKind[:delimiter] + ClassOfKind[:nesting_delimiter] = ClassOfKind[:delimiter] + ClassOfKind[:escape] = ClassOfKind[:delimiter] + #ClassOfKind.default = ClassOfKind[:error] or raise 'no class found for :error!' + end +end
\ No newline at end of file |