diff options
author | no author <noone@nowhere> | 2005-09-26 23:03:08 +0000 |
---|---|---|
committer | no author <noone@nowhere> | 2005-09-26 23:03:08 +0000 |
commit | 26037371627e81f7d2a1151c36fbfc5ccf264edb (patch) | |
tree | f2a2601fd70e9126345d6058cf07b6e55f1c191f | |
parent | a1a3b71479ef30e3a92b9e2530f69e89ba8aaa76 (diff) | |
download | coderay-26037371627e81f7d2a1151c36fbfc5ccf264edb.tar.gz |
Sources in RDoc are now highlighted with CodeRay itself! :-Y
-rw-r--r-- | Rakefile | 1 | ||||
-rw-r--r-- | rake_helpers/coderay_rdoc_template.rb | 23 |
2 files changed, 6 insertions, 18 deletions
@@ -19,6 +19,7 @@ Rake::RDocTask.new :rdoc do |rd| rd.main = ROOT + 'README'
rd.title = "CodeRay Documentation"
rd.options << '--line-numbers' << '--inline-source' << '--tab-width' << '2'
+ rd.options << '--fmt' << 'html_coderay'
rd.template = 'rake_helpers/coderay_rdoc_template.rb'
rd.rdoc_files.add ROOT + 'README'
rd.rdoc_files.add *Dir[LIB_ROOT + '**/*.rb']
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">→</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 |