From b60448c9788d37d7c0ab9cd0a3f0337861c64843 Mon Sep 17 00:00:00 2001 From: murphy Date: Sun, 13 Nov 2005 06:24:54 +0000 Subject: New Style system added - still beta. Demos adjusted coderay.rb, encoders/html.rb, encoders/div.rb adjusted. encoders/html/* files rebuild. --- lib/coderay/encoders/html.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/coderay/encoders/html.rb') 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 << '' * @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] -- cgit v1.2.1