##// END OF EJS Templates
Fixes diff highlighting (#5199)....
Jean-Philippe Lang -
r3505:4a51f1007491
parent child
Show More
@@ -46,7 +46,7 module Redmine
46 46 # Highlights +text+ using +language+ syntax
47 47 # Should not return outer pre tag
48 48 def highlight_by_language(text, language)
49 ::CodeRay.scan(text, language).html(:line_numbers => :inline)
49 ::CodeRay.scan(text, language).html(:line_numbers => :inline, :wrap => :span)
50 50 end
51 51 end
52 52 end
@@ -90,35 +90,39 div.action_D { background: #f88 }
90 90 div.action_A { background: #bfb }
91 91
92 92 /************* CodeRay styles *************/
93
93 .syntaxhl div {display: inline;}
94 94 .syntaxhl .no { padding: 2px 4px 2px 4px; background-color: #eee; margin:0 }
95 95 .syntaxhl .code pre { overflow: auto }
96 96 .syntaxhl .debug { color:white ! important; background:blue ! important; }
97 97
98 98 .syntaxhl .af { color:#00C }
99 99 .syntaxhl .an { color:#007 }
100 .syntaxhl .at { color:#f08 }
100 101 .syntaxhl .av { color:#700 }
101 102 .syntaxhl .aw { color:#C00 }
102 103 .syntaxhl .bi { color:#509; font-weight:bold }
103 .syntaxhl .c { color:#666; }
104 .syntaxhl .c { color:#888; }
104 105
105 106 .syntaxhl .ch { color:#04D }
106 107 .syntaxhl .ch .k { color:#04D }
107 108 .syntaxhl .ch .dl { color:#039 }
108 109
109 110 .syntaxhl .cl { color:#B06; font-weight:bold }
111 .syntaxhl .cm { color:#A08; font-weight:bold }
110 112 .syntaxhl .co { color:#036; font-weight:bold }
111 113 .syntaxhl .cr { color:#0A0 }
112 114 .syntaxhl .cv { color:#369 }
115 .syntaxhl .de { color:#B0B; }
113 116 .syntaxhl .df { color:#099; font-weight:bold }
114 117 .syntaxhl .di { color:#088; font-weight:bold }
115 118 .syntaxhl .dl { color:black }
116 119 .syntaxhl .do { color:#970 }
120 .syntaxhl .dt { color:#34b }
117 121 .syntaxhl .ds { color:#D42; font-weight:bold }
118 122 .syntaxhl .e { color:#666; font-weight:bold }
119 123 .syntaxhl .en { color:#800; font-weight:bold }
120 124 .syntaxhl .er { color:#F00; background-color:#FAA }
121 .syntaxhl .ex { color:#F00; font-weight:bold }
125 .syntaxhl .ex { color:#C00; font-weight:bold }
122 126 .syntaxhl .fl { color:#60E; font-weight:bold }
123 127 .syntaxhl .fu { color:#06B; font-weight:bold }
124 128 .syntaxhl .gv { color:#d70; font-weight:bold }
@@ -126,11 +130,13 div.action_A { background: #bfb }
126 130 .syntaxhl .i { color:#00D; font-weight:bold }
127 131 .syntaxhl .ic { color:#B44; font-weight:bold }
128 132
129 .syntaxhl .il { background: #eee }
130 .syntaxhl .il .il { background: #ddd }
131 .syntaxhl .il .il .il { background: #ccc }
132 .syntaxhl .il .idl { font-weight: bold; color: #888 }
133 .syntaxhl .il { background: #ddd; color: black }
134 .syntaxhl .il .il { background: #ccc }
135 .syntaxhl .il .il .il { background: #bbb }
136 .syntaxhl .il .idl { background: #ddd; font-weight: bold; color: #666 }
137 .syntaxhl .idl { background-color: #bbb; font-weight: bold; color: #666; }
133 138
139 .syntaxhl .im { color:#f00; }
134 140 .syntaxhl .in { color:#B2B; font-weight:bold }
135 141 .syntaxhl .iv { color:#33B }
136 142 .syntaxhl .la { color:#970; font-weight:bold }
@@ -140,9 +146,15 div.action_A { background: #bfb }
140 146 .syntaxhl .op { }
141 147 .syntaxhl .pc { color:#038; font-weight:bold }
142 148 .syntaxhl .pd { color:#369; font-weight:bold }
143 .syntaxhl .pp { color:#579 }
144 .syntaxhl .pt { color:#339; font-weight:bold }
145 .syntaxhl .r { color:#080; font-weight:bold }
149 .syntaxhl .pp { color:#579; }
150 .syntaxhl .ps { color:#00C; font-weight:bold }
151 .syntaxhl .pt { color:#074; font-weight:bold }
152 .syntaxhl .r, .kw { color:#080; font-weight:bold }
153
154 .syntaxhl .ke { color: #808; }
155 .syntaxhl .ke .dl { color: #606; }
156 .syntaxhl .ke .ch { color: #80f; }
157 .syntaxhl .vl { color: #088; }
146 158
147 159 .syntaxhl .rx { background-color:#fff0ff }
148 160 .syntaxhl .rx .k { color:#808 }
@@ -150,14 +162,15 div.action_A { background: #bfb }
150 162 .syntaxhl .rx .mod { color:#C2C }
151 163 .syntaxhl .rx .fu { color:#404; font-weight: bold }
152 164
153 .syntaxhl .s { background-color:#fff0f0 }
154 .syntaxhl .s .s { background-color:#ffe0e0 }
155 .syntaxhl .s .s .s { background-color:#ffd0d0 }
156 .syntaxhl .s .k { color:#D20 }
157 .syntaxhl .s .dl { color:#710 }
165 .syntaxhl .s { background-color:#fff0f0; color: #D20; }
166 .syntaxhl .s .s { background-color:#ffe0e0 }
167 .syntaxhl .s .s .s { background-color:#ffd0d0 }
168 .syntaxhl .s .k { }
169 .syntaxhl .s .ch { color: #b0b; }
170 .syntaxhl .s .dl { color: #710; }
158 171
159 .syntaxhl .sh { background-color:#f0fff0 }
160 .syntaxhl .sh .k { color:#2B2 }
172 .syntaxhl .sh { background-color:#f0fff0; color:#2B2 }
173 .syntaxhl .sh .k { }
161 174 .syntaxhl .sh .dl { color:#161 }
162 175
163 176 .syntaxhl .sy { color:#A60 }
@@ -170,3 +183,13 div.action_A { background: #bfb }
170 183 .syntaxhl .ty { color:#339; font-weight:bold }
171 184 .syntaxhl .v { color:#036 }
172 185 .syntaxhl .xt { color:#444 }
186
187 .syntaxhl .ins { background: #cfc; }
188 .syntaxhl .del { background: #fcc; }
189 .syntaxhl .chg { color: #aaf; background: #007; }
190 .syntaxhl .head { color: #f8f; background: #505 }
191
192 .syntaxhl .ins .ins { color: #080; font-weight:bold }
193 .syntaxhl .del .del { color: #800; font-weight:bold }
194 .syntaxhl .chg .chg { color: #66f; }
195 .syntaxhl .head .head { color: #f4f; }
General Comments 0
You need to be logged in to leave comments. Login now