summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/html.rb
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-01-22 14:13:43 +0000
committermurphy <murphy@rubychan.de>2009-01-22 14:13:43 +0000
commit70dcba4428281407ff0b92a417c3d6d6939390a4 (patch)
treeb8e467002cd75e7a1694bc7e403218806e915c7d /lib/coderay/encoders/html.rb
parent4c64867ce924aca00fc40849e83acbfe2fcc3b29 (diff)
downloadcoderay-70dcba4428281407ff0b92a417c3d6d6939390a4.tar.gz
New feature: HTML encode option :highlight_lines. See documentation.
* The scanner test suite uses it and highlights the lines that differ after a failed complete test in *.actual.html.
Diffstat (limited to 'lib/coderay/encoders/html.rb')
-rw-r--r--lib/coderay/encoders/html.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb
index 035ee65..f7f99f7 100644
--- a/lib/coderay/encoders/html.rb
+++ b/lib/coderay/encoders/html.rb
@@ -56,6 +56,16 @@ module Encoders
#
# Default: 10
#
+ # === :highlight_lines
+ #
+ # Highlights certain line numbers now by using the :highlight_lines option.
+ # Can be any Enumerable, typically just an Array or Range, of numbers.
+ #
+ # Bolding is deactivated when :highlight_lines is set. It only makes sense
+ # in combination with :line_numbers.
+ #
+ # Default: nil
+ #
# === :hint
# Include some information into the output using the title attribute.
# Can be :info (show token type on mouse-over), :info_long (with full path)
@@ -82,6 +92,7 @@ module Encoders
:line_numbers => nil,
:line_number_start => 1,
:bold_every => 10,
+ :highlight_lines => nil,
:hint => false,
}