summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Rakefile4
-rw-r--r--lib/coderay/encoders/html.rb2
-rw-r--r--lib/coderay/encoders/html/css.rb2
-rw-r--r--lib/coderay/helpers/plugin.rb4
-rw-r--r--lib/coderay/styles/cycnus.rb2
-rw-r--r--rake_helpers/coderay_rdoc_template.rb2
-rw-r--r--rake_helpers/html_coderay_generator.rb4
7 files changed, 11 insertions, 9 deletions
diff --git a/Rakefile b/Rakefile
index 630edf5..b37b869 100644
--- a/Rakefile
+++ b/Rakefile
@@ -226,8 +226,8 @@ end
desc 'Upload example to ' + FTP_DOMAIN
task :up_example do
- g 'Highlighting self...'
- system 'ruby -wIlib ../hidden/highlight.rb -1 -L -I lib lib/coderay'
+ gn 'Highlighting self...'
+ system 'ruby -wIlib ../hidden/highlight.rb -1 -L -I lib lib/coderay/**/'
gd
gn 'Uploading example:'
cYcnus_ftp do |ftp|
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb
index df4130e..e456356 100644
--- a/lib/coderay/encoders/html.rb
+++ b/lib/coderay/encoders/html.rb
@@ -71,7 +71,7 @@ module Encoders
:level => :xhtml,
:css => :class,
- :style => :cYcnus,
+ :style => :cycnus,
:wrap => :page,
diff --git a/lib/coderay/encoders/html/css.rb b/lib/coderay/encoders/html/css.rb
index 69d002a..ef564ce 100644
--- a/lib/coderay/encoders/html/css.rb
+++ b/lib/coderay/encoders/html/css.rb
@@ -3,7 +3,7 @@ module CodeRay module Encoders
class HTML
class CSS
- DEFAULT_STYLESHEET_ID = :cYcnus
+ DEFAULT_STYLESHEET_ID = :cycnus
attr :stylesheet
diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb
index 37bdc4c..f88fe7f 100644
--- a/lib/coderay/helpers/plugin.rb
+++ b/lib/coderay/helpers/plugin.rb
@@ -206,7 +206,7 @@ protected
File.join plugin_path, "#{plugin_id}.rb"
end
- # Converts +id+ to a downcase Symbol if it is a String,
+ # Converts +id+ to a Symbol if it is a String,
# or returns +id+ if it already is a Symbol.
#
# Raises +ArgumentError+ for all other objects, or if the
@@ -216,7 +216,7 @@ protected
id
elsif id.is_a? String
if id[/\w+/] == id
- id.downcase.to_sym
+ id.to_sym
else
raise ArgumentError, "Invalid id: '#{id}' given."
end
diff --git a/lib/coderay/styles/cycnus.rb b/lib/coderay/styles/cycnus.rb
index 264b5fe..ec19fae 100644
--- a/lib/coderay/styles/cycnus.rb
+++ b/lib/coderay/styles/cycnus.rb
@@ -3,7 +3,7 @@ module CodeRay
class CYcnus < Style
- register_for :cYcnus
+ register_for :cycnus
code_background = '#f8f8f8'
numbers_background = '#def'
diff --git a/rake_helpers/coderay_rdoc_template.rb b/rake_helpers/coderay_rdoc_template.rb
index 867a144..c16a494 100644
--- a/rake_helpers/coderay_rdoc_template.rb
+++ b/rake_helpers/coderay_rdoc_template.rb
@@ -31,7 +31,7 @@ CA
$: << 'lib'
require 'coderay'
-STYLE = Hy.ca <<CSS + CodeRay::Encoders[:html]::CSS::DEFAULT_STYLESHEET
+STYLE = Hy.ca <<CSS + CodeRay::Encoders[:html]::CSS.new.stylesheet
a { text-decoration: none; }
a:link { color: $LINK }
a:visited { color: $VISITED }
diff --git a/rake_helpers/html_coderay_generator.rb b/rake_helpers/html_coderay_generator.rb
index b460974..4f872e3 100644
--- a/rake_helpers/html_coderay_generator.rb
+++ b/rake_helpers/html_coderay_generator.rb
@@ -1079,8 +1079,10 @@ module Generators
src
end
- $: << 'L:/root/trunk/lib'
require 'coderay'
+ CodeRay::Scanners.load_all
+ CodeRay::Encoders.load_all
+ CodeRay::Styles.load_all
def markup_code(tokens)
code = tokens.map { |t| t.text }.join