##// END OF EJS Templates
Replaced french word "anonyme" at app/views/wiki/diff.rhtml with label_user_anonymous (#8994)....
Replaced french word "anonyme" at app/views/wiki/diff.rhtml with label_user_anonymous (#8994). Contributed by Tom Rochette. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6410 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r4619:144ca23442a5
r6290:77f0756bc046
Show More
debug.rb
62 lines | 1.3 KiB | text/x-ruby | RubyLexer
Jean-Philippe Lang
Added syntax highlightment for repository files (using CodeRay)....
r638 module CodeRay
module Scanners
# = Debug Scanner
class Debug < Scanner
include Streamable
register_for :debug
Jean-Philippe Lang
Upgrade CodeRay to 0.9.2 (#3359)....
r3478 file_extension 'raydebug'
title 'CodeRay Token Dump'
Jean-Philippe Lang
Added syntax highlightment for repository files (using CodeRay)....
r638
protected
def scan_tokens tokens, options
opened_tokens = []
until eos?
kind = nil
match = nil
if scan(/\s+/)
tokens << [matched, :space]
next
elsif scan(/ (\w+) \( ( [^\)\\]* ( \\. [^\)\\]* )* ) \) /x)
kind = self[1].to_sym
match = self[2].gsub(/\\(.)/, '\1')
elsif scan(/ (\w+) < /x)
kind = self[1].to_sym
opened_tokens << kind
match = :open
Jean-Philippe Lang
Upgrade CodeRay to 0.9.2 (#3359)....
r3478 elsif !opened_tokens.empty? && scan(/ > /x)
kind = opened_tokens.pop || :error
Jean-Philippe Lang
Added syntax highlightment for repository files (using CodeRay)....
r638 match = :close
else
kind = :error
getch
end
match ||= matched
Jean-Philippe Lang
Upgrade CodeRay to 0.9.2 (#3359)....
r3478 if $CODERAY_DEBUG and not kind
Jean-Philippe Lang
Added syntax highlightment for repository files (using CodeRay)....
r638 raise_inspect 'Error token %p in line %d' %
[[match, kind], line], tokens
end
raise_inspect 'Empty token', tokens unless match
tokens << [match, kind]
end
tokens
end
end
end
end