Updated CodeRay to 1.0.6.
Fixed multiline comments highlighting issue in file view (#7495). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9389 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
de0689d4f4
commit
dd8d8e0560
2
Gemfile
2
Gemfile
|
@ -2,7 +2,7 @@ source :rubygems
|
||||||
|
|
||||||
gem "rails", "2.3.14"
|
gem "rails", "2.3.14"
|
||||||
gem "i18n", "~> 0.4.2"
|
gem "i18n", "~> 0.4.2"
|
||||||
gem "coderay", "~> 1.0.0"
|
gem "coderay", "~> 1.0.6"
|
||||||
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
|
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
|
||||||
gem "tzinfo", "~> 0.3.31"
|
gem "tzinfo", "~> 0.3.31"
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ module Redmine
|
||||||
# Should not return line numbers nor outer pre tag
|
# Should not return line numbers nor outer pre tag
|
||||||
def highlight_by_filename(text, filename)
|
def highlight_by_filename(text, filename)
|
||||||
language = ::CodeRay::FileType[filename]
|
language = ::CodeRay::FileType[filename]
|
||||||
language ? ::CodeRay.scan(text, language).html : ERB::Util.h(text)
|
language ? ::CodeRay.scan(text, language).html(:break_lines => true) : ERB::Util.h(text)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Highlights +text+ using +language+ syntax
|
# Highlights +text+ using +language+ syntax
|
||||||
|
|
|
@ -110,85 +110,74 @@ div.action_A { background: #bfb }
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
}
|
}
|
||||||
.syntaxhl .code pre { overflow: auto }
|
.syntaxhl .code pre { overflow: auto }
|
||||||
.syntaxhl .debug { color:white ! important; background:blue ! important; }
|
.syntaxhl .debug { color: white !important; background: blue !important; }
|
||||||
|
|
||||||
.syntaxhl .attribute-name { color:#b48 }
|
|
||||||
.syntaxhl .annotation { color:#007 }
|
.syntaxhl .annotation { color:#007 }
|
||||||
|
.syntaxhl .attribute-name { color:#b48 }
|
||||||
.syntaxhl .attribute-value { color:#700 }
|
.syntaxhl .attribute-value { color:#700 }
|
||||||
.syntaxhl .binary { color:#509 }
|
.syntaxhl .binary { color:#509 }
|
||||||
|
.syntaxhl .char .content { color:#D20 }
|
||||||
|
.syntaxhl .char .delimiter { color:#710 }
|
||||||
|
.syntaxhl .char { color:#D20 }
|
||||||
|
.syntaxhl .class { color:#B06; font-weight:bold }
|
||||||
|
.syntaxhl .class-variable { color:#369 }
|
||||||
|
.syntaxhl .color { color:#0A0 }
|
||||||
.syntaxhl .comment { color:#777 }
|
.syntaxhl .comment { color:#777 }
|
||||||
.syntaxhl .comment .char { color:#444 }
|
.syntaxhl .comment .char { color:#444 }
|
||||||
.syntaxhl .comment .delimiter { color:#444 }
|
.syntaxhl .comment .delimiter { color:#444 }
|
||||||
|
|
||||||
.syntaxhl .char { color:#D20 }
|
|
||||||
.syntaxhl .char .content { color:#D20 }
|
|
||||||
.syntaxhl .char .delimiter { color:#710 }
|
|
||||||
|
|
||||||
.syntaxhl .class { color:#B06; font-weight:bold }
|
|
||||||
.syntaxhl .complex { color:#A08 }
|
.syntaxhl .complex { color:#A08 }
|
||||||
.syntaxhl .constant { color:#036; font-weight:bold }
|
.syntaxhl .constant { color:#036; font-weight:bold }
|
||||||
.syntaxhl .color { color:#0A0 }
|
|
||||||
.syntaxhl .class-variable { color:#369 }
|
|
||||||
.syntaxhl .decorator { color:#B0B }
|
.syntaxhl .decorator { color:#B0B }
|
||||||
.syntaxhl .definition { color:#099; font-weight:bold }
|
.syntaxhl .definition { color:#099; font-weight:bold }
|
||||||
.syntaxhl .directive { color:#088; font-weight:bold }
|
|
||||||
.syntaxhl .delimiter { color:black }
|
.syntaxhl .delimiter { color:black }
|
||||||
|
.syntaxhl .directive { color:#088; font-weight:bold }
|
||||||
.syntaxhl .doc { color:#970 }
|
.syntaxhl .doc { color:#970 }
|
||||||
.syntaxhl .doctype { color:#34b }
|
|
||||||
.syntaxhl .doc-string { color:#D42; font-weight:bold }
|
.syntaxhl .doc-string { color:#D42; font-weight:bold }
|
||||||
.syntaxhl .escape { color:#666 }
|
.syntaxhl .doctype { color:#34b }
|
||||||
.syntaxhl .entity { color:#800; font-weight:bold }
|
.syntaxhl .entity { color:#800; font-weight:bold }
|
||||||
.syntaxhl .error { color:#F00; background-color:#FAA }
|
.syntaxhl .error { color:#F00; background-color:#FAA }
|
||||||
|
.syntaxhl .escape { color:#666 }
|
||||||
.syntaxhl .exception { color:#C00; font-weight:bold }
|
.syntaxhl .exception { color:#C00; font-weight:bold }
|
||||||
.syntaxhl .float { color:#60E }
|
.syntaxhl .float { color:#60E }
|
||||||
.syntaxhl .function { color:#06B; font-weight:bold }
|
.syntaxhl .function { color:#06B; font-weight:bold }
|
||||||
.syntaxhl .global-variable { color:#d70 }
|
.syntaxhl .global-variable { color:#d70 }
|
||||||
.syntaxhl .hex { color:#02b }
|
.syntaxhl .hex { color:#02b }
|
||||||
.syntaxhl .integer { color:#00D }
|
|
||||||
.syntaxhl .include { color:#B44; font-weight:bold }
|
|
||||||
.syntaxhl .imaginary { color:#f00 }
|
.syntaxhl .imaginary { color:#f00 }
|
||||||
|
.syntaxhl .include { color:#B44; font-weight:bold }
|
||||||
.syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black }
|
.syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black }
|
||||||
.syntaxhl .inline-delimiter { font-weight: bold; color: #666 }
|
.syntaxhl .inline-delimiter { font-weight: bold; color: #666 }
|
||||||
|
|
||||||
.syntaxhl .instance-variable { color:#33B }
|
.syntaxhl .instance-variable { color:#33B }
|
||||||
|
.syntaxhl .integer { color:#00D }
|
||||||
|
.syntaxhl .key .char { color: #60f }
|
||||||
|
.syntaxhl .key .delimiter { color: #404 }
|
||||||
|
.syntaxhl .key { color: #606 }
|
||||||
|
.syntaxhl .keyword { color:#080; font-weight:bold }
|
||||||
.syntaxhl .label { color:#970; font-weight:bold }
|
.syntaxhl .label { color:#970; font-weight:bold }
|
||||||
.syntaxhl .local-variable { color:#963 }
|
.syntaxhl .local-variable { color:#963 }
|
||||||
.syntaxhl .namespace { color:#707; font-weight:bold }
|
.syntaxhl .namespace { color:#707; font-weight:bold }
|
||||||
.syntaxhl .octal { color:#40E }
|
.syntaxhl .octal { color:#40E }
|
||||||
.syntaxhl .operator { }
|
.syntaxhl .operator { }
|
||||||
.syntaxhl .predefined-constant { color:#069 }
|
|
||||||
.syntaxhl .predefined { color:#369; font-weight:bold }
|
.syntaxhl .predefined { color:#369; font-weight:bold }
|
||||||
|
.syntaxhl .predefined-constant { color:#069 }
|
||||||
.syntaxhl .predefined-type { color:#0a5; font-weight:bold }
|
.syntaxhl .predefined-type { color:#0a5; font-weight:bold }
|
||||||
.syntaxhl .preprocessor { color:#579 }
|
.syntaxhl .preprocessor { color:#579 }
|
||||||
.syntaxhl .pseudo-class { color:#00C; font-weight:bold }
|
.syntaxhl .pseudo-class { color:#00C; font-weight:bold }
|
||||||
.syntaxhl .reserved { color:#080; font-weight:bold }
|
|
||||||
|
|
||||||
.syntaxhl .key .char { color: #60f }
|
|
||||||
.syntaxhl .key .delimiter { color: #404 }
|
|
||||||
.syntaxhl .key { color: #606 }
|
|
||||||
.syntaxhl .keyword { color:#080; font-weight:bold }
|
|
||||||
|
|
||||||
.syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); }
|
|
||||||
.syntaxhl .regexp .content { color:#808 }
|
.syntaxhl .regexp .content { color:#808 }
|
||||||
.syntaxhl .regexp .delimiter { color:#404 }
|
.syntaxhl .regexp .delimiter { color:#404 }
|
||||||
.syntaxhl .regexp .modifier { color:#C2C }
|
.syntaxhl .regexp .modifier { color:#C2C }
|
||||||
|
.syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); }
|
||||||
.syntaxhl .string { background-color:hsla(0,100%,50%,0.05); }
|
.syntaxhl .reserved { color:#080; font-weight:bold }
|
||||||
.syntaxhl .string .content { color: #D20 }
|
|
||||||
.syntaxhl .string .char { color: #b0b }
|
|
||||||
.syntaxhl .string .delimiter { color: #710 }
|
|
||||||
.syntaxhl .string .modifier { color: #E40 }
|
|
||||||
|
|
||||||
.syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); }
|
|
||||||
.syntaxhl .shell .content { color:#2B2 }
|
.syntaxhl .shell .content { color:#2B2 }
|
||||||
.syntaxhl .shell .delimiter { color:#161 }
|
.syntaxhl .shell .delimiter { color:#161 }
|
||||||
|
.syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); }
|
||||||
.syntaxhl .symbol { color:#A60 }
|
.syntaxhl .string .char { color: #b0b }
|
||||||
|
.syntaxhl .string .content { color: #D20 }
|
||||||
|
.syntaxhl .string .delimiter { color: #710 }
|
||||||
|
.syntaxhl .string .modifier { color: #E40 }
|
||||||
|
.syntaxhl .string { background-color:hsla(0,100%,50%,0.05); }
|
||||||
.syntaxhl .symbol .content { color:#A60 }
|
.syntaxhl .symbol .content { color:#A60 }
|
||||||
.syntaxhl .symbol .delimiter { color:#630 }
|
.syntaxhl .symbol .delimiter { color:#630 }
|
||||||
|
.syntaxhl .symbol { color:#A60 }
|
||||||
.syntaxhl .tag { color:#070 }
|
.syntaxhl .tag { color:#070 }
|
||||||
.syntaxhl .type { color:#339; font-weight:bold }
|
.syntaxhl .type { color:#339; font-weight:bold }
|
||||||
.syntaxhl .value { color: #088; }
|
.syntaxhl .value { color: #088; }
|
||||||
|
@ -199,3 +188,11 @@ div.action_A { background: #bfb }
|
||||||
.syntaxhl .change { color: #bbf; background: #007; }
|
.syntaxhl .change { color: #bbf; background: #007; }
|
||||||
.syntaxhl .head { color: #f8f; background: #505 }
|
.syntaxhl .head { color: #f8f; background: #505 }
|
||||||
.syntaxhl .head .filename { color: white; }
|
.syntaxhl .head .filename { color: white; }
|
||||||
|
|
||||||
|
.syntaxhl .delete .eyecatcher { background-color: hsla(0,100%,50%,0.2); border: 1px solid hsla(0,100%,45%,0.5); margin: -1px; border-bottom: none; border-top-left-radius: 5px; border-top-right-radius: 5px; }
|
||||||
|
.syntaxhl .insert .eyecatcher { background-color: hsla(120,100%,50%,0.2); border: 1px solid hsla(120,100%,25%,0.5); margin: -1px; border-top: none; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; }
|
||||||
|
|
||||||
|
.syntaxhl .insert .insert { color: #0c0; background:transparent; font-weight:bold }
|
||||||
|
.syntaxhl .delete .delete { color: #c00; background:transparent; font-weight:bold }
|
||||||
|
.syntaxhl .change .change { color: #88f }
|
||||||
|
.syntaxhl .head .head { color: #f4f }
|
||||||
|
|
Loading…
Reference in New Issue