@@ -46,7 +46,7 module Redmine | |||||
46 | # Highlights +text+ using +language+ syntax |
|
46 | # Highlights +text+ using +language+ syntax | |
47 | # Should not return outer pre tag |
|
47 | # Should not return outer pre tag | |
48 | def highlight_by_language(text, language) |
|
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 | end |
|
50 | end | |
51 | end |
|
51 | end | |
52 | end |
|
52 | end |
@@ -90,35 +90,39 div.action_D { background: #f88 } | |||||
90 | div.action_A { background: #bfb } |
|
90 | div.action_A { background: #bfb } | |
91 |
|
91 | |||
92 | /************* CodeRay styles *************/ |
|
92 | /************* CodeRay styles *************/ | |
93 |
|
93 | .syntaxhl div {display: inline;} | ||
94 | .syntaxhl .no { padding: 2px 4px 2px 4px; background-color: #eee; margin:0 } |
|
94 | .syntaxhl .no { padding: 2px 4px 2px 4px; background-color: #eee; margin:0 } | |
95 | .syntaxhl .code pre { overflow: auto } |
|
95 | .syntaxhl .code pre { overflow: auto } | |
96 | .syntaxhl .debug { color:white ! important; background:blue ! important; } |
|
96 | .syntaxhl .debug { color:white ! important; background:blue ! important; } | |
97 |
|
97 | |||
98 | .syntaxhl .af { color:#00C } |
|
98 | .syntaxhl .af { color:#00C } | |
99 | .syntaxhl .an { color:#007 } |
|
99 | .syntaxhl .an { color:#007 } | |
|
100 | .syntaxhl .at { color:#f08 } | |||
100 | .syntaxhl .av { color:#700 } |
|
101 | .syntaxhl .av { color:#700 } | |
101 | .syntaxhl .aw { color:#C00 } |
|
102 | .syntaxhl .aw { color:#C00 } | |
102 | .syntaxhl .bi { color:#509; font-weight:bold } |
|
103 | .syntaxhl .bi { color:#509; font-weight:bold } | |
103 |
.syntaxhl .c { color:# |
|
104 | .syntaxhl .c { color:#888; } | |
104 |
|
105 | |||
105 | .syntaxhl .ch { color:#04D } |
|
106 | .syntaxhl .ch { color:#04D } | |
106 | .syntaxhl .ch .k { color:#04D } |
|
107 | .syntaxhl .ch .k { color:#04D } | |
107 | .syntaxhl .ch .dl { color:#039 } |
|
108 | .syntaxhl .ch .dl { color:#039 } | |
108 |
|
109 | |||
109 | .syntaxhl .cl { color:#B06; font-weight:bold } |
|
110 | .syntaxhl .cl { color:#B06; font-weight:bold } | |
|
111 | .syntaxhl .cm { color:#A08; font-weight:bold } | |||
110 | .syntaxhl .co { color:#036; font-weight:bold } |
|
112 | .syntaxhl .co { color:#036; font-weight:bold } | |
111 | .syntaxhl .cr { color:#0A0 } |
|
113 | .syntaxhl .cr { color:#0A0 } | |
112 | .syntaxhl .cv { color:#369 } |
|
114 | .syntaxhl .cv { color:#369 } | |
|
115 | .syntaxhl .de { color:#B0B; } | |||
113 | .syntaxhl .df { color:#099; font-weight:bold } |
|
116 | .syntaxhl .df { color:#099; font-weight:bold } | |
114 | .syntaxhl .di { color:#088; font-weight:bold } |
|
117 | .syntaxhl .di { color:#088; font-weight:bold } | |
115 | .syntaxhl .dl { color:black } |
|
118 | .syntaxhl .dl { color:black } | |
116 | .syntaxhl .do { color:#970 } |
|
119 | .syntaxhl .do { color:#970 } | |
|
120 | .syntaxhl .dt { color:#34b } | |||
117 | .syntaxhl .ds { color:#D42; font-weight:bold } |
|
121 | .syntaxhl .ds { color:#D42; font-weight:bold } | |
118 | .syntaxhl .e { color:#666; font-weight:bold } |
|
122 | .syntaxhl .e { color:#666; font-weight:bold } | |
119 | .syntaxhl .en { color:#800; font-weight:bold } |
|
123 | .syntaxhl .en { color:#800; font-weight:bold } | |
120 | .syntaxhl .er { color:#F00; background-color:#FAA } |
|
124 | .syntaxhl .er { color:#F00; background-color:#FAA } | |
121 |
.syntaxhl .ex { color:# |
|
125 | .syntaxhl .ex { color:#C00; font-weight:bold } | |
122 | .syntaxhl .fl { color:#60E; font-weight:bold } |
|
126 | .syntaxhl .fl { color:#60E; font-weight:bold } | |
123 | .syntaxhl .fu { color:#06B; font-weight:bold } |
|
127 | .syntaxhl .fu { color:#06B; font-weight:bold } | |
124 | .syntaxhl .gv { color:#d70; font-weight:bold } |
|
128 | .syntaxhl .gv { color:#d70; font-weight:bold } | |
@@ -126,11 +130,13 div.action_A { background: #bfb } | |||||
126 | .syntaxhl .i { color:#00D; font-weight:bold } |
|
130 | .syntaxhl .i { color:#00D; font-weight:bold } | |
127 | .syntaxhl .ic { color:#B44; font-weight:bold } |
|
131 | .syntaxhl .ic { color:#B44; font-weight:bold } | |
128 |
|
132 | |||
129 |
.syntaxhl .il { background: # |
|
133 | .syntaxhl .il { background: #ddd; color: black } | |
130 |
.syntaxhl .il .il { background: # |
|
134 | .syntaxhl .il .il { background: #ccc } | |
131 |
.syntaxhl .il .il .il { background: # |
|
135 | .syntaxhl .il .il .il { background: #bbb } | |
132 |
.syntaxhl .il .idl { font-weight: bold; color: # |
|
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 | .syntaxhl .in { color:#B2B; font-weight:bold } |
|
140 | .syntaxhl .in { color:#B2B; font-weight:bold } | |
135 | .syntaxhl .iv { color:#33B } |
|
141 | .syntaxhl .iv { color:#33B } | |
136 | .syntaxhl .la { color:#970; font-weight:bold } |
|
142 | .syntaxhl .la { color:#970; font-weight:bold } | |
@@ -140,9 +146,15 div.action_A { background: #bfb } | |||||
140 | .syntaxhl .op { } |
|
146 | .syntaxhl .op { } | |
141 | .syntaxhl .pc { color:#038; font-weight:bold } |
|
147 | .syntaxhl .pc { color:#038; font-weight:bold } | |
142 | .syntaxhl .pd { color:#369; font-weight:bold } |
|
148 | .syntaxhl .pd { color:#369; font-weight:bold } | |
143 | .syntaxhl .pp { color:#579 } |
|
149 | .syntaxhl .pp { color:#579; } | |
144 |
.syntaxhl .p |
|
150 | .syntaxhl .ps { color:#00C; font-weight:bold } | |
145 |
.syntaxhl . |
|
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 | .syntaxhl .rx { background-color:#fff0ff } |
|
159 | .syntaxhl .rx { background-color:#fff0ff } | |
148 | .syntaxhl .rx .k { color:#808 } |
|
160 | .syntaxhl .rx .k { color:#808 } | |
@@ -150,14 +162,15 div.action_A { background: #bfb } | |||||
150 | .syntaxhl .rx .mod { color:#C2C } |
|
162 | .syntaxhl .rx .mod { color:#C2C } | |
151 | .syntaxhl .rx .fu { color:#404; font-weight: bold } |
|
163 | .syntaxhl .rx .fu { color:#404; font-weight: bold } | |
152 |
|
164 | |||
153 |
.syntaxhl .s |
|
165 | .syntaxhl .s { background-color:#fff0f0; color: #D20; } | |
154 |
.syntaxhl .s |
|
166 | .syntaxhl .s .s { background-color:#ffe0e0 } | |
155 |
.syntaxhl .s |
|
167 | .syntaxhl .s .s .s { background-color:#ffd0d0 } | |
156 |
.syntaxhl .s |
|
168 | .syntaxhl .s .k { } | |
157 |
.syntaxhl .s |
|
169 | .syntaxhl .s .ch { color: #b0b; } | |
|
170 | .syntaxhl .s .dl { color: #710; } | |||
158 |
|
171 | |||
159 | .syntaxhl .sh { background-color:#f0fff0 } |
|
172 | .syntaxhl .sh { background-color:#f0fff0; color:#2B2 } | |
160 |
.syntaxhl .sh .k { |
|
173 | .syntaxhl .sh .k { } | |
161 | .syntaxhl .sh .dl { color:#161 } |
|
174 | .syntaxhl .sh .dl { color:#161 } | |
162 |
|
175 | |||
163 | .syntaxhl .sy { color:#A60 } |
|
176 | .syntaxhl .sy { color:#A60 } | |
@@ -170,3 +183,13 div.action_A { background: #bfb } | |||||
170 | .syntaxhl .ty { color:#339; font-weight:bold } |
|
183 | .syntaxhl .ty { color:#339; font-weight:bold } | |
171 | .syntaxhl .v { color:#036 } |
|
184 | .syntaxhl .v { color:#036 } | |
172 | .syntaxhl .xt { color:#444 } |
|
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