##// END OF EJS Templates
Optimization: load attachments when needed....
Optimization: load attachments when needed. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3581 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r2965:4e3202d2a2c5
r3467:2f5c17a0f6ea
Show More
text.rb
32 lines | 429 B | text/x-ruby | RubyLexer
Jean-Philippe Lang
Added syntax highlightment for repository files (using CodeRay)....
r638 module CodeRay
module Encoders
class Text < Encoder
include Streamable
register_for :text
FILE_EXTENSION = 'txt'
DEFAULT_OPTIONS = {
:separator => ''
}
protected
def setup options
Jean-Philippe Lang
Reverts r3014 (CodeRay back to 0.7.6)....
r2965 @out = ''
Jean-Philippe Lang
Added syntax highlightment for repository files (using CodeRay)....
r638 @sep = options[:separator]
end
Jean-Philippe Lang
Reverts r3014 (CodeRay back to 0.7.6)....
r2965 def token text, kind
@out << text + @sep if text.is_a? ::String
Jean-Philippe Lang
Added syntax highlightment for repository files (using CodeRay)....
r638 end
def finish options
Jean-Philippe Lang
Reverts r3014 (CodeRay back to 0.7.6)....
r2965 @out.chomp @sep
Jean-Philippe Lang
Added syntax highlightment for repository files (using CodeRay)....
r638 end
end
end
end