diff options
Diffstat (limited to 'lib/coderay/encoders/helpers')
-rw-r--r-- | lib/coderay/encoders/helpers/html_output.rb | 14 |
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
|