diff options
author | murphy <murphy@rubychan.de> | 2010-04-02 01:53:38 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2010-04-02 01:53:38 +0000 |
commit | b9377ad2633d5f7de92b339f1ad28b11942adfe3 (patch) | |
tree | 759095552fbebb6b01c2fcd9c8398d97237a5e81 /lib/coderay/encoders/html/output.rb | |
parent | 1de8e57c915561e0c5ce7e98e8760c7e7ad0a38e (diff) | |
download | coderay-b9377ad2633d5f7de92b339f1ad28b11942adfe3.tar.gz |
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.
Diffstat (limited to 'lib/coderay/encoders/html/output.rb')
-rw-r--r-- | lib/coderay/encoders/html/output.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/coderay/encoders/html/output.rb b/lib/coderay/encoders/html/output.rb index 83c4ec6..533235d 100644 --- a/lib/coderay/encoders/html/output.rb +++ b/lib/coderay/encoders/html/output.rb @@ -168,18 +168,12 @@ module Encoders TABLE = <<-`TABLE` <table class="CodeRay"><tr> - <td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"><pre><%LINE_NUMBERS%></pre></td> + <td class="line_numbers" title="double click to toggle" ondblclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }"><pre><%LINE_NUMBERS%></pre></td> <td class="code"><pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><%CONTENT%></pre></td> </tr></table> TABLE # title="double click to expand" - LIST = <<-`LIST` -<ol class="CodeRay"> -<%CONTENT%> -</ol> - LIST - PAGE = <<-`PAGE` <!DOCTYPE html> <html> @@ -187,6 +181,10 @@ module Encoders <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css"> +.CodeRay .line_numbers a, .CodeRay .no a { + text-decoration: inherit; + color: inherit; +} <%CSS%> </style> </head> |