From b9377ad2633d5f7de92b339f1ad28b11942adfe3 Mon Sep 17 00:00:00 2001 From: murphy Date: Fri, 2 Apr 2010 01:53:38 +0000 Subject: New HTML Encoder option :line_number_anchors (closes #208). Also removed the :list wrapping style, and made a lot of cleanup in the styles. See Changes.textile. --- lib/coderay/encoders/html.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/coderay/encoders/html.rb') diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb index 56857dc..dcdffa1 100644 --- a/lib/coderay/encoders/html.rb +++ b/lib/coderay/encoders/html.rb @@ -49,10 +49,18 @@ module Encoders # Default: 'CodeRay output' # # === :line_numbers - # Include line numbers in :table, :inline, :list or nil (no line numbers) + # Include line numbers in :table, :inline, or nil (no line numbers) # # Default: nil # + # === :line_number_anchors + # Adds anchors and links to the line numbers. Can be false (off), true (on), + # or a prefix string that will be prepended to the anchor name. + # + # The prefix must consist only of letters, digits, and underscores. + # + # Default: true, default prefix name: "line" + # # === :line_number_start # Where to start with line number counting. # @@ -96,6 +104,7 @@ module Encoders :title => 'CodeRay output', :line_numbers => nil, + :line_number_anchors => 'n', :line_number_start => 1, :bold_every => 10, :highlight_lines => nil, -- cgit v1.2.1