summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/helpers
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2005-10-29 16:09:17 +0000
committermurphy <murphy@rubychan.de>2005-10-29 16:09:17 +0000
commit39ff12b40e0b8b3a892aea63eddfae87531f5d10 (patch)
treec94d1a334bf3f11896af65abb1aeda4de9b1e000 /lib/coderay/encoders/helpers
parent20cc0418476d2f27276fbf4cfe42fd884092befd (diff)
downloadcoderay-39ff12b40e0b8b3a892aea63eddfae87531f5d10.tar.gz
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
Diffstat (limited to 'lib/coderay/encoders/helpers')
-rw-r--r--lib/coderay/encoders/helpers/html_output.rb14
1 files changed, 12 insertions, 2 deletions
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
+<style type="text/css">
+#{ss}
+</style>
+ 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