summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/html.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-04-14 01:28:25 +0000
committermurphy <murphy@rubychan.de>2009-04-14 01:28:25 +0000
commitd57dada25c771c9273241be7df80f35f09985a1a (patch)
treefba0fe8eeb2c2e98a5df7451d65806c49cafe60f /lib/coderay/encoders/html.rb
parent0d01835fd3f04f822f14596f00e032d272747010 (diff)
downloadcoderay-d57dada25c771c9273241be7df80f35f09985a1a.tar.gz
Added a :title option for the HTML Encoder. Closes #55.
Diffstat (limited to 'lib/coderay/encoders/html.rb')
-rw-r--r--lib/coderay/encoders/html.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb
index f7f99f7..4e47396 100644
--- a/lib/coderay/encoders/html.rb
+++ b/lib/coderay/encoders/html.rb
@@ -41,6 +41,12 @@ module Encoders
#
# Default: nil
#
+ # === :title
+ #
+ # The title of the HTML page (works only when :wrap is set to :page.)
+ #
+ # Default: 'CodeRay output'
+ #
# === :line_numbers
# Include line numbers in :table, :inline, :list or nil (no line numbers)
#
@@ -86,8 +92,8 @@ module Encoders
:css => :class,
:style => :cycnus,
-
:wrap => nil,
+ :title => 'CodeRay output',
:line_numbers => nil,
:line_number_start => 1,
@@ -227,6 +233,7 @@ module Encoders
@out.css = @css
@out.numerize! options[:line_numbers], options
@out.wrap! options[:wrap]
+ @out.apply_title! options[:title]
super
end