From 39ff12b40e0b8b3a892aea63eddfae87531f5d10 Mon Sep 17 00:00:00 2001 From: murphy Date: Sat, 29 Oct 2005 16:09:17 +0000 Subject: Version 0.4.6! coderay.rb: Added highlight functions new demo/demo_highlight.rb encoders/helpers/html_output.rb: Improved stylesheet method Rakefile: smarter progress info on uploading --- lib/coderay/encoders/helpers/html_output.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/coderay/encoders/helpers') diff --git a/lib/coderay/encoders/helpers/html_output.rb b/lib/coderay/encoders/helpers/html_output.rb index 2ff5c19..c6012f7 100644 --- a/lib/coderay/encoders/helpers/html_output.rb +++ b/lib/coderay/encoders/helpers/html_output.rb @@ -35,8 +35,14 @@ module CodeRay warn "The Output module is intended to extend instances of String, not #{o.class}." unless o.respond_to? :to_str end - def stylesheet - CSS::DEFAULT_STYLESHEET + def stylesheet in_tag = false + ss = CSS::DEFAULT_STYLESHEET + ss = <<-CSS if in_tag + + CSS + ss end def page_template_for_css css = :default @@ -174,6 +180,10 @@ module CodeRay clone.numerize!(*args) end + def stylesheet in_tag = false + Output.stylesheet in_tag + end + class Template < String def self.wrap! str, template, target -- cgit v1.2.1