##// END OF EJS Templates
Merged r9389 from trunk....
Jean-Philippe Lang -
r9268:baa4ebd05f39
parent child
Show More
@@ -2,7 +2,7 source :rubygems
2
2
3 gem "rails", "2.3.14"
3 gem "rails", "2.3.14"
4 gem "i18n", "~> 0.4.2"
4 gem "i18n", "~> 0.4.2"
5 gem "coderay", "~> 1.0.0"
5 gem "coderay", "~> 1.0.6"
6 gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
6 gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
7 gem "tzinfo", "~> 0.3.31"
7 gem "tzinfo", "~> 0.3.31"
8
8
@@ -40,7 +40,7 module Redmine
40 # Should not return line numbers nor outer pre tag
40 # Should not return line numbers nor outer pre tag
41 def highlight_by_filename(text, filename)
41 def highlight_by_filename(text, filename)
42 language = ::CodeRay::FileType[filename]
42 language = ::CodeRay::FileType[filename]
43 language ? ::CodeRay.scan(text, language).html : ERB::Util.h(text)
43 language ? ::CodeRay.scan(text, language).html(:break_lines => true) : ERB::Util.h(text)
44 end
44 end
45
45
46 # Highlights +text+ using +language+ syntax
46 # Highlights +text+ using +language+ syntax
@@ -112,83 +112,72 div.action_A { background: #bfb }
112 .syntaxhl .code pre { overflow: auto }
112 .syntaxhl .code pre { overflow: auto }
113 .syntaxhl .debug { color:white ! important; background:blue ! important; }
113 .syntaxhl .debug { color: white !important; background: blue !important; }
114
114
115 .syntaxhl .attribute-name { color:#b48 }
116 .syntaxhl .annotation { color:#007 }
115 .syntaxhl .annotation { color:#007 }
116 .syntaxhl .attribute-name { color:#b48 }
117 .syntaxhl .attribute-value { color:#700 }
117 .syntaxhl .attribute-value { color:#700 }
118 .syntaxhl .binary { color:#509 }
118 .syntaxhl .binary { color:#509 }
119
120 .syntaxhl .comment { color:#777 }
121 .syntaxhl .comment .char { color:#444 }
122 .syntaxhl .comment .delimiter { color:#444 }
123
124 .syntaxhl .char { color:#D20 }
125 .syntaxhl .char .content { color:#D20 }
119 .syntaxhl .char .content { color:#D20 }
126 .syntaxhl .char .delimiter { color:#710 }
120 .syntaxhl .char .delimiter { color:#710 }
127
121 .syntaxhl .char { color:#D20 }
128 .syntaxhl .class { color:#B06; font-weight:bold }
122 .syntaxhl .class { color:#B06; font-weight:bold }
123 .syntaxhl .class-variable { color:#369 }
124 .syntaxhl .color { color:#0A0 }
125 .syntaxhl .comment { color:#777 }
126 .syntaxhl .comment .char { color:#444 }
127 .syntaxhl .comment .delimiter { color:#444 }
129 .syntaxhl .complex { color:#A08 }
128 .syntaxhl .complex { color:#A08 }
130 .syntaxhl .constant { color:#036; font-weight:bold }
129 .syntaxhl .constant { color:#036; font-weight:bold }
131 .syntaxhl .color { color:#0A0 }
132 .syntaxhl .class-variable { color:#369 }
133 .syntaxhl .decorator { color:#B0B }
130 .syntaxhl .decorator { color:#B0B }
134 .syntaxhl .definition { color:#099; font-weight:bold }
131 .syntaxhl .definition { color:#099; font-weight:bold }
135 .syntaxhl .directive { color:#088; font-weight:bold }
136 .syntaxhl .delimiter { color:black }
132 .syntaxhl .delimiter { color:black }
133 .syntaxhl .directive { color:#088; font-weight:bold }
137 .syntaxhl .doc { color:#970 }
134 .syntaxhl .doc { color:#970 }
138 .syntaxhl .doctype { color:#34b }
139 .syntaxhl .doc-string { color:#D42; font-weight:bold }
135 .syntaxhl .doc-string { color:#D42; font-weight:bold }
140 .syntaxhl .escape { color:#666 }
136 .syntaxhl .doctype { color:#34b }
141 .syntaxhl .entity { color:#800; font-weight:bold }
137 .syntaxhl .entity { color:#800; font-weight:bold }
142 .syntaxhl .error { color:#F00; background-color:#FAA }
138 .syntaxhl .error { color:#F00; background-color:#FAA }
139 .syntaxhl .escape { color:#666 }
143 .syntaxhl .exception { color:#C00; font-weight:bold }
140 .syntaxhl .exception { color:#C00; font-weight:bold }
144 .syntaxhl .float { color:#60E }
141 .syntaxhl .float { color:#60E }
145 .syntaxhl .function { color:#06B; font-weight:bold }
142 .syntaxhl .function { color:#06B; font-weight:bold }
146 .syntaxhl .global-variable { color:#d70 }
143 .syntaxhl .global-variable { color:#d70 }
147 .syntaxhl .hex { color:#02b }
144 .syntaxhl .hex { color:#02b }
148 .syntaxhl .integer { color:#00D }
149 .syntaxhl .include { color:#B44; font-weight:bold }
150 .syntaxhl .imaginary { color:#f00 }
145 .syntaxhl .imaginary { color:#f00 }
151
146 .syntaxhl .include { color:#B44; font-weight:bold }
152 .syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black }
147 .syntaxhl .inline { background-color: hsla(0,0%,0%,0.07); color: black }
153 .syntaxhl .inline-delimiter { font-weight: bold; color: #666 }
148 .syntaxhl .inline-delimiter { font-weight: bold; color: #666 }
154
155 .syntaxhl .instance-variable { color:#33B }
149 .syntaxhl .instance-variable { color:#33B }
150 .syntaxhl .integer { color:#00D }
151 .syntaxhl .key .char { color: #60f }
152 .syntaxhl .key .delimiter { color: #404 }
153 .syntaxhl .key { color: #606 }
154 .syntaxhl .keyword { color:#080; font-weight:bold }
156 .syntaxhl .label { color:#970; font-weight:bold }
155 .syntaxhl .label { color:#970; font-weight:bold }
157 .syntaxhl .local-variable { color:#963 }
156 .syntaxhl .local-variable { color:#963 }
158 .syntaxhl .namespace { color:#707; font-weight:bold }
157 .syntaxhl .namespace { color:#707; font-weight:bold }
159 .syntaxhl .octal { color:#40E }
158 .syntaxhl .octal { color:#40E }
160 .syntaxhl .operator { }
159 .syntaxhl .operator { }
161 .syntaxhl .predefined-constant { color:#069 }
162 .syntaxhl .predefined { color:#369; font-weight:bold }
160 .syntaxhl .predefined { color:#369; font-weight:bold }
161 .syntaxhl .predefined-constant { color:#069 }
163 .syntaxhl .predefined-type { color:#0a5; font-weight:bold }
162 .syntaxhl .predefined-type { color:#0a5; font-weight:bold }
164 .syntaxhl .preprocessor { color:#579 }
163 .syntaxhl .preprocessor { color:#579 }
165 .syntaxhl .pseudo-class { color:#00C; font-weight:bold }
164 .syntaxhl .pseudo-class { color:#00C; font-weight:bold }
166 .syntaxhl .reserved { color:#080; font-weight:bold }
167
168 .syntaxhl .key .char { color: #60f }
169 .syntaxhl .key .delimiter { color: #404 }
170 .syntaxhl .key { color: #606 }
171 .syntaxhl .keyword { color:#080; font-weight:bold }
172
173 .syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); }
174 .syntaxhl .regexp .content { color:#808 }
165 .syntaxhl .regexp .content { color:#808 }
175 .syntaxhl .regexp .delimiter { color:#404 }
166 .syntaxhl .regexp .delimiter { color:#404 }
176 .syntaxhl .regexp .modifier { color:#C2C }
167 .syntaxhl .regexp .modifier { color:#C2C }
177
168 .syntaxhl .regexp { background-color:hsla(300,100%,50%,0.06); }
178 .syntaxhl .string { background-color:hsla(0,100%,50%,0.05); }
169 .syntaxhl .reserved { color:#080; font-weight:bold }
179 .syntaxhl .string .content { color: #D20 }
170 .syntaxhl .shell .content { color:#2B2 }
171 .syntaxhl .shell .delimiter { color:#161 }
172 .syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); }
180 .syntaxhl .string .char { color: #b0b }
173 .syntaxhl .string .char { color: #b0b }
174 .syntaxhl .string .content { color: #D20 }
181 .syntaxhl .string .delimiter { color: #710 }
175 .syntaxhl .string .delimiter { color: #710 }
182 .syntaxhl .string .modifier { color: #E40 }
176 .syntaxhl .string .modifier { color: #E40 }
183
177 .syntaxhl .string { background-color:hsla(0,100%,50%,0.05); }
184 .syntaxhl .shell { background-color:hsla(120,100%,50%,0.06); }
185 .syntaxhl .shell .content { color:#2B2 }
186 .syntaxhl .shell .delimiter { color:#161 }
187
188 .syntaxhl .symbol { color:#A60 }
189 .syntaxhl .symbol .content { color:#A60 }
178 .syntaxhl .symbol .content { color:#A60 }
190 .syntaxhl .symbol .delimiter { color:#630 }
179 .syntaxhl .symbol .delimiter { color:#630 }
191
180 .syntaxhl .symbol { color:#A60 }
192 .syntaxhl .tag { color:#070 }
181 .syntaxhl .tag { color:#070 }
193 .syntaxhl .type { color:#339; font-weight:bold }
182 .syntaxhl .type { color:#339; font-weight:bold }
194 .syntaxhl .value { color: #088; }
183 .syntaxhl .value { color: #088; }
@@ -199,3 +188,11 div.action_A { background: #bfb }
199 .syntaxhl .change { color: #bbf; background: #007; }
188 .syntaxhl .change { color: #bbf; background: #007; }
200 .syntaxhl .head { color: #f8f; background: #505 }
189 .syntaxhl .head { color: #f8f; background: #505 }
201 .syntaxhl .head .filename { color: white; }
190 .syntaxhl .head .filename { color: white; }
191
192 .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; }
193 .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; }
194
195 .syntaxhl .insert .insert { color: #0c0; background:transparent; font-weight:bold }
196 .syntaxhl .delete .delete { color: #c00; background:transparent; font-weight:bold }
197 .syntaxhl .change .change { color: #88f }
198 .syntaxhl .head .head { color: #f4f }
General Comments 0
You need to be logged in to leave comments. Login now