summaryrefslogtreecommitdiff
path: root/rake_helpers
diff options
context:
space:
mode:
authorno author <noone@nowhere>2005-09-26 23:03:08 +0000
committerno author <noone@nowhere>2005-09-26 23:03:08 +0000
commit26037371627e81f7d2a1151c36fbfc5ccf264edb (patch)
treef2a2601fd70e9126345d6058cf07b6e55f1c191f /rake_helpers
parenta1a3b71479ef30e3a92b9e2530f69e89ba8aaa76 (diff)
downloadcoderay-26037371627e81f7d2a1151c36fbfc5ccf264edb.tar.gz
Sources in RDoc are now highlighted with CodeRay itself! :-Y
Diffstat (limited to 'rake_helpers')
-rw-r--r--rake_helpers/coderay_rdoc_template.rb23
1 files changed, 5 insertions, 18 deletions
diff --git a/rake_helpers/coderay_rdoc_template.rb b/rake_helpers/coderay_rdoc_template.rb
index 01e67ea..e3c297e 100644
--- a/rake_helpers/coderay_rdoc_template.rb
+++ b/rake_helpers/coderay_rdoc_template.rb
@@ -28,7 +28,10 @@ Hy.ca <<CA
>>
CA
-STYLE = Hy.ca <<CSS
+$: << 'lib'
+require 'coderay'
+
+STYLE = Hy.ca <<CSS + CodeRay::Encoders[:html]::CSS::DEFAULT_STYLESHEET
a { text-decoration: none; }
a:link { color: $LINK }
a:visited { color: $VISITED }
@@ -116,21 +119,7 @@ td.file-title {
.dyn-source {
display: none;
- background: #FFE;
- color: black;
- border: 1px dotted black;
- margin: 0.5em 2em 0.5em 2em;
- padding: 0.5em;
-}
-
-.dyn-source .cmt {
- color: #00F;
- font-style: italic;
-}
-
-.dyn-source .kw {
- color: #070;
- font-weight: bold;
+ margin: 0.5em;
}
.method {
@@ -499,9 +488,7 @@ IF:sourcecode
<div class="sourcecode">
<p class="source-link"><span class="arrow">&rarr;</span> <a href="javascript:toggleSource('%aref%_source')" id="l_%aref%_source">show source</a></p>
<div id="%aref%_source" class="dyn-source">
-<pre>
%sourcecode%
-</pre>
</div>
</div>
ENDIF:sourcecode