summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/html.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2005-11-13 06:24:54 +0000
committermurphy <murphy@rubychan.de>2005-11-13 06:24:54 +0000
commitb60448c9788d37d7c0ab9cd0a3f0337861c64843 (patch)
treeb4046870310445532e0ff9b6aef70bc17086ab62 /lib/coderay/encoders/html.rb
parent07da5153646a7ae0a9551533221870c47ec950d2 (diff)
downloadcoderay-b60448c9788d37d7c0ab9cd0a3f0337861c64843.tar.gz
New Style system added - still beta.
Demos adjusted coderay.rb, encoders/html.rb, encoders/div.rb adjusted. encoders/html/* files rebuild.
Diffstat (limited to 'lib/coderay/encoders/html.rb')
-rw-r--r--lib/coderay/encoders/html.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb
index 986bf00..df4130e 100644
--- a/lib/coderay/encoders/html.rb
+++ b/lib/coderay/encoders/html.rb
@@ -71,6 +71,8 @@ module Encoders
:level => :xhtml,
:css => :class,
+ :style => :cYcnus,
+
:wrap => :page,
:line_numbers => nil,
@@ -84,6 +86,8 @@ module Encoders
require 'coderay/encoders/html/output'
require 'coderay/encoders/html/css'
+ attr_reader :css
+
def initialize(*)
super
@last_options = nil
@@ -116,7 +120,7 @@ module Encoders
@HTML_ESCAPE["\t"] = ' ' * options[:tab_width]
@opened = [nil]
- @css = CSS.new
+ @css = CSS.new options[:style]
hint = options[:hint]
if hint and not [:debug, :info].include? hint
@@ -192,6 +196,7 @@ module Encoders
@out << '</span>' * @opened.size
@out.extend Output
+ @out.css = @css
@out.numerize! options[:line_numbers], options # if options[:line_numbers]
@out.wrap! options[:wrap] # if options[:wrap]