Feature #3382 » syntax_highlighter_patch.diff
| lib/redmine/syntax_highlighting.rb | ||
|---|---|---|
|
# Highlights +text+ using +language+ syntax
|
||
|
# Should not return outer pre tag
|
||
|
def highlight_by_language(text, language)
|
||
|
::CodeRay.scan(text, language).html(:line_numbers => :inline, :wrap => :span)
|
||
|
::CodeRay.scan(text, language).html(:line_numbers => :table)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
| public/stylesheets/scm.css | ||
|---|---|---|
|
.syntaxhl .del .del { color: #800; font-weight:bold }
|
||
|
.syntaxhl .chg .chg { color: #66f; }
|
||
|
.syntaxhl .head .head { color: #f4f; }
|
||
|
table.CodeRay { border-collapse: collapse }
|
||
|
table.CodeRay td { vertical-align: top }
|
||
|
table.CodeRay td.line_numbers {
|
||
|
background-color: #def;
|
||
|
color: gray;
|
||
|
text-align: right;
|
||
|
}
|
||
|
table.CodeRay td.code { width: 100% }
|
||
|
table.CodeRay td.line_numbers pre, table.CodeRay td.code pre {
|
||
|
padding: 0; margin:0;
|
||
|
background-color: transparent;
|
||
|
border: none;
|
||
|
}
|
||
|
table.CodeRay .af { color:#00C }
|
||
|
table.CodeRay .an { color:#007 }
|
||
|
table.CodeRay .at { color:#f08 }
|
||
|
table.CodeRay .av { color:#700 }
|
||
|
table.CodeRay .aw { color:#C00 }
|
||
|
table.CodeRay .bi { color:#509; font-weight:bold }
|
||
|
table.CodeRay .c { color:#888; }
|
||
|
table.CodeRay .ch { color:#04D }
|
||
|
table.CodeRay .ch .k { color:#04D }
|
||
|
table.CodeRay .ch .dl { color:#039 }
|
||
|
table.CodeRay .cl { color:#B06; font-weight:bold }
|
||
|
table.CodeRay .cm { color:#A08; font-weight:bold }
|
||
|
table.CodeRay .co { color:#036; font-weight:bold }
|
||
|
table.CodeRay .cr { color:#0A0 }
|
||
|
table.CodeRay .cv { color:#369 }
|
||
|
table.CodeRay .de { color:#B0B; }
|
||
|
table.CodeRay .df { color:#099; font-weight:bold }
|
||
|
table.CodeRay .di { color:#088; font-weight:bold }
|
||
|
table.CodeRay .dl { color:black }
|
||
|
table.CodeRay .do { color:#970 }
|
||
|
table.CodeRay .dt { color:#34b }
|
||
|
table.CodeRay .ds { color:#D42; font-weight:bold }
|
||
|
table.CodeRay .e { color:#666; font-weight:bold }
|
||
|
table.CodeRay .en { color:#800; font-weight:bold }
|
||
|
table.CodeRay .er { color:#F00; background-color:#FAA }
|
||
|
table.CodeRay .ex { color:#C00; font-weight:bold }
|
||
|
table.CodeRay .fl { color:#60E; font-weight:bold }
|
||
|
table.CodeRay .fu { color:#06B; font-weight:bold }
|
||
|
table.CodeRay .gv { color:#d70; font-weight:bold }
|
||
|
table.CodeRay .hx { color:#058; font-weight:bold }
|
||
|
table.CodeRay .i { color:#00D; font-weight:bold }
|
||
|
table.CodeRay .ic { color:#B44; font-weight:bold }
|
||
|
table.CodeRay .il { background: #ddd; color: black }
|
||
|
table.CodeRay .il .il { background: #ccc }
|
||
|
table.CodeRay .il .il .il { background: #bbb }
|
||
|
table.CodeRay .il .idl { background: #ddd; font-weight: bold; color: #666 }
|
||
|
table.CodeRay .idl { background-color: #bbb; font-weight: bold; color: #666; }
|
||
|
table.CodeRay .im { color:#f00; }
|
||
|
table.CodeRay .in { color:#B2B; font-weight:bold }
|
||
|
table.CodeRay .iv { color:#33B }
|
||
|
table.CodeRay .la { color:#970; font-weight:bold }
|
||
|
table.CodeRay .lv { color:#963 }
|
||
|
table.CodeRay .oc { color:#40E; font-weight:bold }
|
||
|
table.CodeRay .of { color:#000; font-weight:bold }
|
||
|
table.CodeRay .op { }
|
||
|
table.CodeRay .pc { color:#038; font-weight:bold }
|
||
|
table.CodeRay .pd { color:#369; font-weight:bold }
|
||
|
table.CodeRay .pp { color:#579; }
|
||
|
table.CodeRay .ps { color:#00C; font-weight:bold }
|
||
|
table.CodeRay .pt { color:#074; font-weight:bold }
|
||
|
table.CodeRay .r, .kw { color:#080; font-weight:bold }
|
||
|
table.CodeRay .ke { color: #808; }
|
||
|
table.CodeRay .ke .dl { color: #606; }
|
||
|
table.CodeRay .ke .ch { color: #80f; }
|
||
|
table.CodeRay .vl { color: #088; }
|
||
|
table.CodeRay .rx { background-color:#fff0ff }
|
||
|
table.CodeRay .rx .k { color:#808 }
|
||
|
table.CodeRay .rx .dl { color:#404 }
|
||
|
table.CodeRay .rx .mod { color:#C2C }
|
||
|
table.CodeRay .rx .fu { color:#404; font-weight: bold }
|
||
|
table.CodeRay .s { background-color:#fff0f0; color: #D20; }
|
||
|
table.CodeRay .s .s { background-color:#ffe0e0 }
|
||
|
table.CodeRay .s .s .s { background-color:#ffd0d0 }
|
||
|
table.CodeRay .s .k { }
|
||
|
table.CodeRay .s .ch { color: #b0b; }
|
||
|
table.CodeRay .s .dl { color: #710; }
|
||
|
table.CodeRay .sh { background-color:#f0fff0; color:#2B2 }
|
||
|
table.CodeRay .sh .k { }
|
||
|
table.CodeRay .sh .dl { color:#161 }
|
||
|
table.CodeRay .sy { color:#A60 }
|
||
|
table.CodeRay .sy .k { color:#A60 }
|
||
|
table.CodeRay .sy .dl { color:#630 }
|
||
|
table.CodeRay .ta { color:#070 }
|
||
|
table.CodeRay .tf { color:#070; font-weight:bold }
|
||
|
table.CodeRay .ts { color:#D70; font-weight:bold }
|
||
|
table.CodeRay .ty { color:#339; font-weight:bold }
|
||
|
table.CodeRay .v { color:#036 }
|
||
|
table.CodeRay .xt { color:#444 }
|
||
|
table.CodeRay .ins { background: #cfc; }
|
||
|
table.CodeRay .del { background: #fcc; }
|
||
|
table.CodeRay .chg { color: #aaf; background: #007; }
|
||
|
table.CodeRay .head { color: #f8f; background: #505 }
|
||
|
table.CodeRay .ins .ins { color: #080; font-weight:bold }
|
||
|
table.CodeRay .del .del { color: #800; font-weight:bold }
|
||
|
table.CodeRay .chg .chg { color: #66f; }
|
||
|
table.CodeRay .head .head { color: #f4f; }
|
||
- « Previous
- 1
- 2
- 3
- Next »